[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] Re: How can I reverse the direction of the Y axis?
|
Randy
Many thanks for your suggestion. Unfortunately I am new to GEF, and cannot
see where to hook this in to my application which is currently loosly based
on the "Logic" example application. Could you provide a few pointers for
me.
Thanks again
Geoff
"Randy Hudson" <none@xxxxxxxxxx> wrote in message
news:dsicl5$5ei$1@xxxxxxxxxxxxxxxxxxxx
> Rectangle rect = canvas.getClientArea();
> Transform t = new Transform(Display.getCurrent());
> t.translate(0f, (float)(rect.height - rect.y));
> t.scale( 0f, -1f);
> gc.setTransform(t);
>
> "geoffc" <geoff_crowther@xxxxxxxxxx> wrote in message
> news:dsga83$pko$1@xxxxxxxxxxxxxxxxxxxx
> > BlankIn the GEF examples (e.g. Logic) the origin (0, 0) is at the top
> > right
> > of the editor window. Positive Y values are below this origin, and
> > negative
> > Y values are above. Is there any way to change this direction, so that
> > positive Y is upwards, preferably also changing the default location of
> > the
> > origin to be the bottom left of the editor window? This would allow the
> > editor to match the conventional representation of an X,Y coordinate
> > system.
> >
> > Many thanks for your help.
> >
> > Geoff Crowther
>
>