birdal46 / grafx2

Automatically exported from code.google.com/p/grafx2
0 stars 0 forks source link

Brush handle position is not preserved #465

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When drawing with a grid (currently working on some mixed textmode stuff...), 
it's rather useful to have the brush handle set to the top left corner of 
brushes.
I can do that in brush FX screen, but each time I grab a brush or draw a text, 
the handle is in the middle of the brush again.

Original issue reported on code.google.com by pulkoma...@gmail.com on 14 Dec 2011 at 9:43

GoogleCodeExporter commented 8 years ago
In the Settings / Editing tab, there is "Adjust brush pick", default "yes". Did 
you accidentally unset it ? Because it does just that: Any brush grab while 
Snap-to-Grid is active automatically sets the handle in top left, with a result 
that you can paste the brush exactly at its original position.

You mention Text, indeed it's probably a good idea to pick top left too when 
rendering a text brush. Maybe also for load-brush, and lua brush-resizing...

Original comment by yrizoud on 14 Dec 2011 at 10:42

GoogleCodeExporter commented 8 years ago
"Adjust brush pick" is meant to reduce the grabbing by 1 pixel on bottom and 
right, so that you can grab grid areas easily without an extra pixel on these 
side because of grid snapping. I wasn't aware it did change the brush handle in 
any way.

Anyway, it was disabled in this case and both text rendering and brush grab did 
set the brush handle on center.

I think keeping the brush handle where it was in the previous brush would be 
fine in most cases ?

Original comment by pulkoma...@gmail.com on 15 Dec 2011 at 9:31

GoogleCodeExporter commented 8 years ago
Aww I was completely wrong in my comment, "Adjust brush pick" is unrelated.
What happens when Grid is active and you grab a brush is that grafx2 sets the 
handle to middle, THEN it rounds down the offsets to the next-smaller multiple 
of tile size. It's only in case where you grab a single tile that the 
rounding-down will produce 0,0 = top-left corner. Note that at the moment, the 
handle stays there even if you disable grid mode. If this change(d), we'd need 
to re-adjust the handle when Snap-to-grid gets re-enabled.

I've no objection to make "brush handle" affect all future brushes. It's the 
behavior of Deluxe Paint, I had always noticed the difference but didn't feel 
the need myself.
Be careful that the brush offsets are computed in more than a dozen places in 
the code.

Original comment by yrizoud on 15 Dec 2011 at 11:15