Re: How to rotate a complex object on the canvas
- From: "Donal K. Fellows" <donal.k.fellows@xxxxxxxxxxxxxxxx>
- Date: Fri, 29 Dec 2006 20:56:52 GMT
maura.monville@xxxxxxxxx wrote:
Is [rotating canvas items] feasible through any magic Tcl/Tk command ?
No, and even if you're rotating things piecemeal, the particular problem
right now is rotating the text. That's supposed to change by the time
8.5 goes Final, but it's not yet implemented. You should be able to make
a rotated version of the other parts of the key just nicely though; if
you pick your font sizes carefully, it will work "well enough" anyway.
Anyway, to details.
Line and polygon items are trivial to rotate using standard affine
transforms. Rectangle and oval items can be rotated the same way, but
only come out looking right if rotated by 90 degree increments. Anything
that's an image will have to be rotated manually (I think there's some
code that's efficient for 90 degree rotations on the Wiki) anyway;
canvases just see those as an opaque rectangle, rather like an embedded
widget. Text items are really the same, but as mentioned above it should
be possible to fake them in 8.5.
Donal.
.
- References:
- How to rotate a complex object on the canvas
- From: maura.monville@xxxxxxxxx
- How to rotate a complex object on the canvas
- Prev by Date: Re: How to rotate a complex object on the canvas
- Next by Date: canvas postscript options
- Previous by thread: Re: How to rotate a complex object on the canvas
- Next by thread: Dr. Dobb's Tcl-URL! - weekly Tcl news and links (Dec 29)
- Index(es):
Relevant Pages
|