On Mon, Jun 28, 2010 at 4:40 PM, <oli...@first.in-berlin.de> wrote:
> when using the rotate tool, I can enable a grid that is shown.
> I also can move the center point.
> What I want to have, is, that the center point's center also
> is at one crossover of grid lines.
> Where (which file) can I change that?
I'm not sure I understood correctly what do you wish to do. If I
understood correctly, when you rotate a drawable, you can use the
option "Preview: Image + Grid". Now, you would like to move the center
of the rotation so that it will snap to this grid.
If this indeed what you mean, then you'll have to modify (at least)
the following files:
app/tools/gimptransformtool.c - The base class for the transformation
tools in GIMP (rotate, shear, transform, scale). The code of the grid
for the transformation tool is there, and this is where you should
look for information about the grid points (try looking at the
function which actually draws the preview grid - it shows how to find
and access the grid points themselves)
app/tools/gimprotatetool.c - The code of the rotate tool
An interesting note which you should probably consider during your
implementation, is that it's weird to snap the center of the rotation
after you started rotating. Why? Because moving the center point will
move the drawable (and the grid itself) and so after you move the
center to some other location which was supposedly a crossover of the
lines, the crossover would also move and it will probably not be
there... (Try it - move the center of the rotation after you already
rotated in some big angle)
Hope this helps =)
Gimp-developer mailing list