Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] need an efficient GC.setPixel( int, int )


Yes.  Enter a buzilla report and it will be done!



"Arnaud De Muyser" <ademuyser@xxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

10/31/2003 07:31 AM
Please respond to platform-swt-dev

       
        To:        platform-swt-dev@xxxxxxxxxxx
        cc:        
        Subject:        [platform-swt-dev] need an efficient GC.setPixel( int, int )




Hello,


I'm using eclipse.2.1.0 on win32 system.

I want to draw a pixel with a color on a GC,
I know I can use GC.drawLine(x,y,x,y), that all users do...


But as we can see in GC source file drawLine (on win32)

do:

- check various things...

- OS.moveTo(...)

- OS.lineTo(...)

- OS.setPixel(...)


Here moveTo()/lineTo() spend time to do nothing.

As I test it in my code replacing drawPixel(x,y,x,y)

by OS.setPixel( ... ), I now this second solution

is 3 (or more times) faster !


So the question is, can GC class be upgraded to have

this kind of method ?

- public void setPixel( int _x, int _y );

- public void setPixel( int _x, int _y, Color _color );



If it's already done or planed to do in 3.0 ... forget me.


Thanks a lot!


Arnaud.


PS:

Using setPixel() in conjonction to color creation, what is the speedest

way to set a color and draw a pixel ?

(I mean  create Color object each time I drawpixel is a total waste of

 memory and time ... ).


Back to the top