Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336617 - [GC] Alpha not reset after using setAdvanced( false )
Summary: [GC] Alpha not reset after using setAdvanced( false )
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.4 M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-08 08:53 EST by Ivan Furnadjiev CLA
Modified: 2011-02-08 09:54 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Furnadjiev CLA 2011-02-08 08:53:47 EST
In SWT, when the advanced graphics system is turn off ( GC#setAdvanced( false) ), the alpha is reset to its initial value 255.
Test case:
  public void testResetAlphaAfterUsingSetAdvanced() {
    Display display = new Display();
    GC gc = new GC( display, SWT.NONE );
    gc.setAlpha( 64 );    
    assertEquals( 64, gc.getAlpha() );
    assertTrue( gc.getAdvanced() );
    gc.setAdvanced( false );
    assertEquals( 255, gc.getAlpha() );
  }
Comment 1 Ivan Furnadjiev CLA 2011-02-08 09:54:33 EST
Alpha is reset to 255 in GC#setAdvanced. Changes are in CVS HEAD.