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

Bug 308524

Summary: [GC] Provide ctor with style
Product: [RT] RAP Reporter: Benjamin Muskalla <b.muskalla>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 1.3   
Target Milestone: 1.3 M7   
Hardware: All   
OS: All   
Whiteboard:

Description Benjamin Muskalla CLA 2010-04-08 13:20:53 EDT
We should support the second GC constructor which takes a Canvas and a style bit. As only LTR and RTL are supported styles, this seems to be ok for us. Class javadoc needs to be updated to reflect valid style bits (LTR)
Comment 1 RĂ¼diger Herrmann CLA 2010-04-14 10:30:14 EDT
When resolving this, the getStyle() method should also be implemented.
Please also check what getStyle() returns by default, i.e. when creating a GC with GC( control, SWT.NONE ); Does it maybe return LEFT_TO_RIGHT, etc.
Comment 2 Ivan Furnadjiev CLA 2010-04-15 03:42:44 EDT
In SWT the GC#getStyle() method returns only SWT.LEFT_TO_RIGHT or SWT.RIGHT_TO_LEFT | SWT.MIRRORED. As we don't support SWT.RIGHT_TO_LEFT, the GC#getStyle() method always returns SWT.LEFT_TO_RIGHT. Changes are in CVS HEAD.