Skip to main content



      Home
Home » Eclipse Projects » GEF » SWTGraphics - wrong behaviour
SWTGraphics - wrong behaviour [message #203718] Fri, 25 November 2005 05:00 Go to next message
Eclipse UserFriend
Originally posted by: kiril.mitov.disy-bg.com

Hi all,

I just want to make sure that the folowing behaviour is not a bug. If it
is I will commit it.

The problem is that the result of the following pieces of code is
different:

Code1:
graphics.pushState();
graphics.translate(10,10);
graphics.rotate(0);//!!! rotate by 0 degrees.
graphics.drawRectangle(0,0,100,100);
graphics.popState();

Code2:
graphics.pushState();
graphics.translate(10,10);
//!!!here the rotate method is commented so there
is no rotation
// graphics.rotate(0);
graphics.drawRectangle(0,0,100,100);
graphics.popState();

When the following methods are executed the result is different.
In the first - Code1 the rectangle is drawn on location 20,20

On the seconde - Code2 the rectangle is drawn on location 10,10

Should the location be different when a rotate(0) method is called.

I am using GEF_3.1.1
With eclipse3.2 M3
I am working on a Linux machine with GTK 2.8.2

Thanks
Thaks.
Re: SWTGraphics - wrong behaviour [message #203753 is a reply to message #203718] Sat, 26 November 2005 23:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

SWT has fixed this bug in the latest integration builds.

"kiril mitov" <kiril.mitov@disy-bg.com> wrote in message
news:b885ce36a07ad400b05c95575bf0fcdf$1@www.eclipse.org...
> Hi all,
> I just want to make sure that the folowing behaviour is not a bug. If it
> is I will commit it.
>
> The problem is that the result of the following pieces of code is
> different:
>
> Code1:
> graphics.pushState();
> graphics.translate(10,10);
> graphics.rotate(0);//!!! rotate by 0 degrees.
> graphics.drawRectangle(0,0,100,100);
> graphics.popState();
>
> Code2:
> graphics.pushState();
> graphics.translate(10,10);
> //!!!here the rotate method is commented so there
> is no rotation
> // graphics.rotate(0);
> graphics.drawRectangle(0,0,100,100);
> graphics.popState();
>
> When the following methods are executed the result is different.
> In the first - Code1 the rectangle is drawn on location 20,20
>
> On the seconde - Code2 the rectangle is drawn on location 10,10
>
> Should the location be different when a rotate(0) method is called.
>
> I am using GEF_3.1.1
> With eclipse3.2 M3
> I am working on a Linux machine with GTK 2.8.2
>
> Thanks
> Thaks.
>
Re: SWTGraphics - wrong behaviour [message #203842 is a reply to message #203753] Mon, 28 November 2005 11:05 Go to previous message
Eclipse UserFriend
Originally posted by: kiril.mitov.disy-bg.com

Yes I saw it.
Thanks...
Previous Topic:PDF export
Next Topic:how to move an anchor by user
Goto Forum:
  


Current Time: Wed May 07 00:56:23 EDT 2025

Powered by FUDForum. Page generated in 0.04088 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top