Re: GnomeCanvas and inverting Y cooordinates



Thanks for the reply.  

Your code inverted the Y coordinate perfectly, but it appears that
the colors become very wierd on both an anti-aliased and normal
canvas.  It looks to me like solid filled polygons become kind 
of rainbow filled, and if I move the polygons they cycle through
colors.  Arrow heads become sort of fuzzy - it looks like 50% of
the arrow head takes on the background color and the rest becomes
something else.  It also cycles colors when moved.

So, any suggestions (cutdown on the caffiene may be accurate but
in this case it probably isn't the problem).

Thanks again,
Kent

>I think applying the transformation to the root group sounds correct. You 
>get the root canvas item group with gnome_canvas_get_root(). Now 
>GnomeCanvasItemGroup's are GnomeCanvasItem's, so you can use 
>gnome_canvas_item_affine_relative(). You would use something like: 

>GnomeCanvasGroup *root = gnome_canvas_root(GNOME_CANVAS(canvas)); 
>   double flip[6] = { 1, 0, 0, -1, 0, 0 }; 
>
>   gnome_canvas_item_affine_relative(GNOME_CANVAS_ITEM(root), flip); 

>Now use gnome_canvas_set_scroll_region() to set the area to draw (using 
>the untransformed coordinate system). 

>James. 
>
>--
>Email: james@daa.com.au
>WWW:   http://www.daa.com.au/~james/
>
>On Thu, 4 Nov 1999 kschumacher@uswest.net wrote:
>> Is there a simple way to invert the behavior of
>> Y coordinates in GnomeCanvas.
>> 
>> In postscript I would use a transform matrix something
>> like [1 0 0 -1 0 -height] (might be wrong - I haven't
>> written postscript this decade).  Is this what an
>> affine is?  If I apply that affine to the root group
>> will that do what I want?  (And of course, how do I
>> apply an affine to a root group, it that's the thing
>> to do).  Grin?
 



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