Re: Enhancement - Diagonal line crop guide

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tim Jedlicka wrote:
> (repost - got lost somewhere the first time)
> 
> I stumbled upon this link describing the use of the Diagonal (45 degree
> diagonal from each corner of an image) as the optimum crop guide ("better"
> than rule-of-thirds or golden rule).
> 
> http://www.diagonaalmethode.nl/
> 
> I hacked together a patch to add the Diagonal crop guide. So, should I open
> an enhancement bugzilla and include the patch? My patch isn't perfect -
> hence posting here since it requires some discussion. If the crop box is a
> portrait, then it works, if landscape (X > Y) then the guides extend beyond
> the crop rectangle. I don't know how to fix this cleanly (using an if
> statement doesn't seem efficient).
> 
> Any guidance (on or off list) would be appreciated. Thanks...Tim
> 

Hi Tim, we appreciate your efforts.

This should be solvable without caring about if the rectangle is in
portrait or landscape. For each line to draw, you have

1. one starting point (a corner, e.g. upper left)
2. one direction (e.g. 45 degrees down to the right for the upper left
corner)
3. another line (e.g. the bottom horizontal line for the upper left corner)

Now you need to calculate the end point by calculating where the 45
degree line intersects with other line. Then draw a line between the
start point and the calculated intersection point.

Martin Nordholts
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux