[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] Draw
|
To draw on an image, you can do the following:
Display display = new Display();
Image image = new Image(display, 100, 100);
GC gc = new GC(image);
gc.drawLine(0, 0, 100, 100);
gc.dispose();
image.dispose();
You might be out of luck when it comes to writing the image to file. There
is API to do this:
FileFormat.unloadIntoStream(ImageData data, LEDataOutputStream
stream);
but the file format classes are internal. Probably shouldn't be used.
You could get the data from the Image - Image.getImageData() - and write
that to a file yourself.
-Jesse
"Maxine Meiring"
<maxine__m@xxxxxxxxxxx> To: platform-swt-dev@xxxxxxxxxxx
Sent by: cc:
platform-swt-dev-admin@ Subject: [platform-swt-dev] Draw
eclipse.org
05/13/2002 05:01 PM
Please respond to
platform-swt-dev
Hi There,
I need some documentation or a simple example of how I would go about
drawing a line on a image in swt and then saving that image to a file.
What should I draw on - canvas?
Regards,
Maxine.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev