Re: Extents under rotation

Donn <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On 06/12/2013 17:13, Bill Spitzak wrote:
> The matrices are multiplied before this is done, so this error does not
> accumulate. For instance if you rotate by 45 degrees and then back by 45
> degrees, it will act like a rotation of 0 and produce your expected
> bounding box, rather than enlarging the bounding box twice.

I'm sure I will face these things soon when I institute picking beyond a 
basic bbox hit approach.



Bill,
Do you have a way to draw a tight bbox in user-space around a path?

I have tried various things like getting the extents in device space (by 
doing a identity_matrix call before extents) and then using 
device_to_user on each returned x,y coordinate -- in order to try get 
those corners *in user space* and I just can't get it right.

I'd like to draw an X shape over my original path: At first I have a 
complex shape - so I want to measure extents and thereafter substitute a 
simple X shape [*] that can be drawn quickly(into user/local space) and 
re-measured by extents in the future.

[*] X from top-left to bottom-right and reverse. Or just a rect, or just 
four dots in the bbox corners.


\d
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.