Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334511 - [Image] Image(Device,int,int) constructor is missing
Summary: [Image] Image(Device,int,int) constructor is missing
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: PC Windows Vista
: P3 enhancement (vote)
Target Milestone: 1.4 M5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 334627
  Show dependency tree
 
Reported: 2011-01-17 08:44 EST by Rüdiger Herrmann CLA
Modified: 2011-01-22 11:00 EST (History)
0 users

See Also:


Attachments
Image(device,width,height) constructor and test cases (6.02 KB, patch)
2011-01-17 08:47 EST, Rüdiger Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rüdiger Herrmann CLA 2011-01-17 08:44:44 EST
The constructor to create an empty image of a given size is missing in RWT.
Typically, this constructor is used to create images that are drawn upon by creating a GC:
  Image image = new Image( device, width, height );
  GC gc = new GC( image );
  gc.drawRectangle( 0, 0, 50, 50 );
  ...
Comment 1 Rüdiger Herrmann CLA 2011-01-17 08:47:11 EST
Created attachment 186904 [details]
Image(device,width,height) constructor and test cases

Calling the constructor creates an image of the given width and height with all pixels set to white.
Comment 2 Ralf Sternberg CLA 2011-01-22 11:00:15 EST
Even though this constructor is useless without GC support for Images, I think there's no reason to hold back a correct implementation.
Applied patch to CVS HEAD.