SWTGraphics - wrong behaviour [message #203718] |
Fri, 25 November 2005 05:00  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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.
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.04088 seconds