Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334511

Summary: [Image] Image(Device,int,int) constructor is missing
Product: [RT] RAP Reporter: Rüdiger Herrmann <ruediger.herrmann>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 1.4   
Target Milestone: 1.4 M5   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Bug Depends on:    
Bug Blocks: 334627    
Attachments:
Description Flags
Image(device,width,height) constructor and test cases none

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.