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

Bug 336617

Summary: [GC] Alpha not reset after using setAdvanced( false )
Product: [RT] RAP Reporter: Ivan Furnadjiev <ivan>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.4   
Target Milestone: 1.4 M6   
Hardware: All   
OS: All   
Whiteboard:

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.