To get most affine transformations to work correctly, you need to use an
antialiased canvas.  This can be done by creating the canvas with
GnomeCanvas(aa=TRUE).

As an example, try editing the fifteen.py example.  At the start add the
line "import gnome.affine".  Below the line where the canvas is
initialised, add the following line:
  canvas.root().affine_absolute(gnome.affine.shear(xshear=0.3))

Now when you run the example, the item's placement should have been
adjusted as expected.  The orientation has not however.  To fix this, edit
fifteen.py, and find the line "canvas = GnomeCanvas()" and change it to
"canvas = GnomeCanvas(aa=TRUE)".  Then it should work correctly.  Maybe I
will add an affine transformation example to the next release of
gnome-python.

James.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


On Wed, 2 Jun 1999, Alexei Gilchrist wrote:

> Hi,
>  
>  I'm just starting to learn to use the gnome canvas.
>  
>  Could someone please give me a brief example of affine
>  transforms at work (using python) ... particularly
>  rotation.
>  
>  Should this work for any item? eg text
>  
>  I only seem to get scaling and translation going for
>  rect's and the like but not rotation or shearing effects
>  
>  Or have I completely missed the point?
>  
>  Many thanks
>  
>  Alexei
> 
> 
> James Henstridge wrote:
> > 
> > Here is a list post that bounced.  Just remember that you need to post
> > with the address you subscribed as.
> > 
> > James.
> > 
> 
> Fixed hopefully.
> A
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
> 

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to