Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Is this a resource leak bug?
Is this a resource leak bug? [message #466061] Fri, 30 December 2005 09:52 Go to next message
Zhiqiang Qian is currently offline Zhiqiang QianFriend
Messages: 76
Registered: July 2009
Member
This is a multi-part message in MIME format.
--------------040301050003000500010205
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi All,

We are currently working on some SWT graphics applications. But when I
use some of the new features of GC since 3.1, it often pops up a "No
More Handle" exception. After investigation, I found this is caused by
the GC.getClipping(Region) routine when under advanced mode.

My environment: WindowsXP Pro, JDK1.4.2, Eclipse3.1(also tested in 3.2).

Here is the code snippet I used to reproduce:
==========================================================
Region rg1, rg2;

rg1 = new Region( Display.getDefault( ) );

// gc.setClipping( 0, 0, 300, 1000 );
gc.getClipping( rg1 );

// ==Enter Advanced Mode
gc.setAdvanced( false );
gc.setAntialias( 1 );
gc.setTextAntialias( 1 );
gc.setAlpha( 127 );

gc.setClipping( rg1 );

gc.drawRectangle( 220, 10, 200, 100 );
gc.drawArc( 220, 10, 200, 100, -45, 45 );
gc.fillArc( 220, 10, 200, 100, 45, 90 );

// A:
rg2 = new Region( Display.getDefault( ) );
gc.getClipping( rg2 );

// B:
// rg2 = rg1;

gc.setAdvanced( false );
// ====Leave Advanced Mode

gc.setClipping( rg2 );

gc.drawRectangle( 430, 10, 200, 100 );

rg1.dispose( );
rg1 = null;

rg2.dispose( );
rg2 = null;
===========================================================

Everytime you run this code(I put it in a method loop), the windows
GDIHandle keeps increasing(You can watch it from the windows
TaskManager). And the strange thing is, if you comment out the code
block A, and use code block B, everything is fine.

So I guess is this a bug for SWT? Since this causes a resource leak, so
its level should be critical.

Any comments are highly appreciated, and also a full test code snippet
is enclosed. Thanks.

--------------040301050003000500010205
Content-Type: text/plain;
name="TestAdvance.java"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="TestAdvance.java"

/*********************************************************** ********************
* Copyright (c) 2004 Actuate Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Actuate Corporation - initial API and implementation
************************************************************ *******************/

package org.eclipse.birt.chart.demo.samples;

import org.eclipse.swt.SWT;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Region;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

/**
*
*/

public class TestAdvance
{

private static boolean blue = true;

public static void main( String[] args )
{
swt( );
}

static void swt( )
{
// DeviceData dd = new DeviceData( );
// dd.tracking = true;
// Display disp = new Display( dd );

Display disp = Display.getDefault( );

// Sleak sl = new Sleak( );
// sl.open( );

Shell shl = new Shell( disp );

shl.setSize( 700, 200 );

drawArc( shl );

shl.open( );

while ( !shl.isDisposed( ) )
{
if ( !disp.readAndDispatch( ) )
{
disp.sleep( );
}
}

disp.dispose( );

}

private static void drawArc( Shell shl )
{
shl.setLayout( new GridLayout( ) );

Button btn = new Button( shl, SWT.PUSH );
btn.setText( "repaint" ); //$NON-NLS-1$
GridData gd = new GridData( );
gd.widthHint = 100;
gd.heightHint = 20;
btn.setLayoutData( gd );

final Composite comp = new Composite( shl, SWT.NONE );

comp.setLayoutData( new GridData( GridData.FILL_BOTH ) );

comp.addPaintListener( new PaintListener( ) {

public void paintControl( PaintEvent e )
{
GC gc = e.gc;

gc.setBackground( blue ? Display.getDefault( )
.getSystemColor( SWT.COLOR_BLUE )
: Display.getDefault( ).getSystemColor( SWT.COLOR_RED ) );

blue = !blue;

gc.drawRectangle( 10, 10, 200, 100 );
gc.drawArc( 10, 10, 200, 100, -45, 45 );
gc.fillArc( 10, 10, 200, 100, 45, 90 );

Region rg1, rg2;

rg1 = new Region( Display.getDefault( ) );

// gc.setClipping( 0, 0, 300, 1000 );
gc.getClipping( rg1 );

// ==Enter Advanced Mode
gc.setAdvanced( false );
gc.setAntialias( 1 );
gc.setTextAntialias( 1 );
gc.setAlpha( 127 );

gc.setClipping( rg1 );

gc.drawRectangle( 220, 10, 200, 100 );
gc.drawArc( 220, 10, 200, 100, -45, 45 );
gc.fillArc( 220, 10, 200, 100, 45, 90 );

rg2 = new Region( Display.getDefault( ) );
gc.getClipping( rg2 );
// rg2 = rg1;

gc.setAdvanced( false );
// ====Leave Advanced Mode

gc.setClipping( rg2 );

gc.drawRectangle( 430, 10, 200, 100 );

rg1.dispose( );
rg1 = null;

rg2.dispose( );
rg2 = null;
}
} );

btn.addSelectionListener( new SelectionListener( ) {

public void widgetDefaultSelected( SelectionEvent e )
{
}

public void widgetSelected( SelectionEvent e )
{
comp.redraw( );
}
} );

}

}

--------------040301050003000500010205--
Re: Is this a resource leak bug? [message #466144 is a reply to message #466061] Tue, 03 January 2006 19:27 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
I filed the following bug report:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=122550


"Zhiqiang Qian" <zqian@actuate.com> wrote in message
news:dp2vvc$pu3$1@utils.eclipse.org...
> Hi All,
>
> We are currently working on some SWT graphics applications. But when I
> use some of the new features of GC since 3.1, it often pops up a "No
> More Handle" exception. After investigation, I found this is caused by
> the GC.getClipping(Region) routine when under advanced mode.
>
> My environment: WindowsXP Pro, JDK1.4.2, Eclipse3.1(also tested in 3.2).
>
> Here is the code snippet I used to reproduce:
> ==========================================================
> Region rg1, rg2;
>
> rg1 = new Region( Display.getDefault( ) );
>
> // gc.setClipping( 0, 0, 300, 1000 );
> gc.getClipping( rg1 );
>
> // ==Enter Advanced Mode
> gc.setAdvanced( false );
> gc.setAntialias( 1 );
> gc.setTextAntialias( 1 );
> gc.setAlpha( 127 );
>
> gc.setClipping( rg1 );
>
> gc.drawRectangle( 220, 10, 200, 100 );
> gc.drawArc( 220, 10, 200, 100, -45, 45 );
> gc.fillArc( 220, 10, 200, 100, 45, 90 );
>
> // A:
> rg2 = new Region( Display.getDefault( ) );
> gc.getClipping( rg2 );
>
> // B:
> // rg2 = rg1;
>
> gc.setAdvanced( false );
> // ====Leave Advanced Mode
>
> gc.setClipping( rg2 );
>
> gc.drawRectangle( 430, 10, 200, 100 );
>
> rg1.dispose( );
> rg1 = null;
>
> rg2.dispose( );
> rg2 = null;
> ===========================================================
>
> Everytime you run this code(I put it in a method loop), the windows
> GDIHandle keeps increasing(You can watch it from the windows
> TaskManager). And the strange thing is, if you comment out the code
> block A, and use code block B, everything is fine.
>
> So I guess is this a bug for SWT? Since this causes a resource leak, so
> its level should be critical.
>
> Any comments are highly appreciated, and also a full test code snippet
> is enclosed. Thanks.
>


------------------------------------------------------------ --------------------


> /*********************************************************** ********************
> * Copyright (c) 2004 Actuate Corporation.
> * All rights reserved. This program and the accompanying materials
> * are made available under the terms of the Eclipse Public License v1.0
> * which accompanies this distribution, and is available at
> * http://www.eclipse.org/legal/epl-v10.html
> *
> * Contributors:
> * Actuate Corporation - initial API and implementation
> ************************************************************ *******************/
>
> package org.eclipse.birt.chart.demo.samples;
>
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.events.PaintEvent;
> import org.eclipse.swt.events.PaintListener;
> import org.eclipse.swt.events.SelectionEvent;
> import org.eclipse.swt.events.SelectionListener;
> import org.eclipse.swt.graphics.GC;
> import org.eclipse.swt.graphics.Region;
> import org.eclipse.swt.layout.GridData;
> import org.eclipse.swt.layout.GridLayout;
> import org.eclipse.swt.widgets.Button;
> import org.eclipse.swt.widgets.Composite;
> import org.eclipse.swt.widgets.Display;
> import org.eclipse.swt.widgets.Shell;
>
> /**
> *
> */
>
> public class TestAdvance
> {
>
> private static boolean blue = true;
>
> public static void main( String[] args )
> {
> swt( );
> }
>
> static void swt( )
> {
> // DeviceData dd = new DeviceData( );
> // dd.tracking = true;
> // Display disp = new Display( dd );
>
> Display disp = Display.getDefault( );
>
> // Sleak sl = new Sleak( );
> // sl.open( );
>
> Shell shl = new Shell( disp );
>
> shl.setSize( 700, 200 );
>
> drawArc( shl );
>
> shl.open( );
>
> while ( !shl.isDisposed( ) )
> {
> if ( !disp.readAndDispatch( ) )
> {
> disp.sleep( );
> }
> }
>
> disp.dispose( );
>
> }
>
> private static void drawArc( Shell shl )
> {
> shl.setLayout( new GridLayout( ) );
>
> Button btn = new Button( shl, SWT.PUSH );
> btn.setText( "repaint" ); //$NON-NLS-1$
> GridData gd = new GridData( );
> gd.widthHint = 100;
> gd.heightHint = 20;
> btn.setLayoutData( gd );
>
> final Composite comp = new Composite( shl, SWT.NONE );
>
> comp.setLayoutData( new GridData( GridData.FILL_BOTH ) );
>
> comp.addPaintListener( new PaintListener( ) {
>
> public void paintControl( PaintEvent e )
> {
> GC gc = e.gc;
>
> gc.setBackground( blue ? Display.getDefault( )
> .getSystemColor( SWT.COLOR_BLUE )
> : Display.getDefault( ).getSystemColor( SWT.COLOR_RED ) );
>
> blue = !blue;
>
> gc.drawRectangle( 10, 10, 200, 100 );
> gc.drawArc( 10, 10, 200, 100, -45, 45 );
> gc.fillArc( 10, 10, 200, 100, 45, 90 );
>
> Region rg1, rg2;
>
> rg1 = new Region( Display.getDefault( ) );
>
> // gc.setClipping( 0, 0, 300, 1000 );
> gc.getClipping( rg1 );
>
> // ==Enter Advanced Mode
> gc.setAdvanced( false );
> gc.setAntialias( 1 );
> gc.setTextAntialias( 1 );
> gc.setAlpha( 127 );
>
> gc.setClipping( rg1 );
>
> gc.drawRectangle( 220, 10, 200, 100 );
> gc.drawArc( 220, 10, 200, 100, -45, 45 );
> gc.fillArc( 220, 10, 200, 100, 45, 90 );
>
> rg2 = new Region( Display.getDefault( ) );
> gc.getClipping( rg2 );
> // rg2 = rg1;
>
> gc.setAdvanced( false );
> // ====Leave Advanced Mode
>
> gc.setClipping( rg2 );
>
> gc.drawRectangle( 430, 10, 200, 100 );
>
> rg1.dispose( );
> rg1 = null;
>
> rg2.dispose( );
> rg2 = null;
> }
> } );
>
> btn.addSelectionListener( new SelectionListener( ) {
>
> public void widgetDefaultSelected( SelectionEvent e )
> {
> }
>
> public void widgetSelected( SelectionEvent e )
> {
> comp.redraw( );
> }
> } );
>
> }
>
> }
>
Re: Is this a resource leak bug? [message #466147 is a reply to message #466144] Tue, 03 January 2006 20:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

By the way, the code presented is not running under advanced mode:

>>
>>// ==Enter Advanced Mode
>>gc.setAdvanced( false );
>>gc.setAntialias( 1 );
>>gc.setTextAntialias( 1 );
>>gc.setAlpha( 127 );
>>
>>gc.setClipping( rg1 );
>>
>>gc.drawRectangle( 220, 10, 200, 100 );
>>gc.drawArc( 220, 10, 200, 100, -45, 45 );
>>gc.fillArc( 220, 10, 200, 100, 45, 90 );
>>
>>// A:
>>rg2 = new Region( Display.getDefault( ) );
>>gc.getClipping( rg2 );
>>
>>// B:
>>// rg2 = rg1;
>>
>>gc.setAdvanced( false );
>>// ====Leave Advanced Mode

This doesn't cause advanced mode to be entered. Because the first line
says gc.setAdvanced(false) NOT gc.setAdvanced(true)!

So the bug is really with not advanced mode. Though this isn't to say
there isn't a problem in advanced mode too!
--
Thanks,
Rich Kulp
Re: Is this a resource leak bug? [message #466149 is a reply to message #466147] Tue, 03 January 2006 20:31 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Calling gc.setAntialias( 1 ) uses GDI+ on Windows. So calling the following
code will print out "true":

gc.getAdvanced(false);
gc.setAntialias(1);
System.out.println(gc.getAdvanced());

To recreate the bug, you do need to cause the GC to use GDI+.

"Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> wrote in message
news:dpemc4$lv0$1@utils.eclipse.org...
> By the way, the code presented is not running under advanced mode:
Re: Is this a resource leak bug? [message #466154 is a reply to message #466149] Tue, 03 January 2006 22:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Ok. But that means the gc.setAdvanced(false) is unneeded because you
would be turning it off and then turning it back on if it was already on
because setAntialias automatically turns it on if it was not already on.

Veronika Irvine wrote:
> Calling gc.setAntialias( 1 ) uses GDI+ on Windows. So calling the following
> code will print out "true":
>
> gc.getAdvanced(false);
> gc.setAntialias(1);
> System.out.println(gc.getAdvanced());
>
> To recreate the bug, you do need to cause the GC to use GDI+.
>
> "Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> wrote in message
> news:dpemc4$lv0$1@utils.eclipse.org...
>
>>By the way, the code presented is not running under advanced mode:
>
>
>

--
Thanks,
Rich Kulp
Re: Is this a resource leak bug? [message #466162 is a reply to message #466144] Wed, 04 January 2006 02:48 Go to previous messageGo to next message
Zhiqiang Qian is currently offline Zhiqiang QianFriend
Messages: 76
Registered: July 2009
Member
Thanks Veronika, I've added myself to the CC list.

Veronika Irvine wrote:
> I filed the following bug report:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=122550
>
>
> "Zhiqiang Qian" <zqian@actuate.com> wrote in message
> news:dp2vvc$pu3$1@utils.eclipse.org...
>> Hi All,
>>
>> We are currently working on some SWT graphics applications. But when I
>> use some of the new features of GC since 3.1, it often pops up a "No
>> More Handle" exception. After investigation, I found this is caused by
>> the GC.getClipping(Region) routine when under advanced mode.
>>
>> My environment: WindowsXP Pro, JDK1.4.2, Eclipse3.1(also tested in 3.2).
>>
>> Here is the code snippet I used to reproduce:
>> ==========================================================
>> Region rg1, rg2;
>>
>> rg1 = new Region( Display.getDefault( ) );
>>
>> // gc.setClipping( 0, 0, 300, 1000 );
>> gc.getClipping( rg1 );
>>
>> // ==Enter Advanced Mode
>> gc.setAdvanced( false );
>> gc.setAntialias( 1 );
>> gc.setTextAntialias( 1 );
>> gc.setAlpha( 127 );
>>
>> gc.setClipping( rg1 );
>>
>> gc.drawRectangle( 220, 10, 200, 100 );
>> gc.drawArc( 220, 10, 200, 100, -45, 45 );
>> gc.fillArc( 220, 10, 200, 100, 45, 90 );
>>
>> // A:
>> rg2 = new Region( Display.getDefault( ) );
>> gc.getClipping( rg2 );
>>
>> // B:
>> // rg2 = rg1;
>>
>> gc.setAdvanced( false );
>> // ====Leave Advanced Mode
>>
>> gc.setClipping( rg2 );
>>
>> gc.drawRectangle( 430, 10, 200, 100 );
>>
>> rg1.dispose( );
>> rg1 = null;
>>
>> rg2.dispose( );
>> rg2 = null;
>> ===========================================================
>>
>> Everytime you run this code(I put it in a method loop), the windows
>> GDIHandle keeps increasing(You can watch it from the windows
>> TaskManager). And the strange thing is, if you comment out the code
>> block A, and use code block B, everything is fine.
>>
>> So I guess is this a bug for SWT? Since this causes a resource leak, so
>> its level should be critical.
>>
>> Any comments are highly appreciated, and also a full test code snippet
>> is enclosed. Thanks.
>>
>
>
> ------------------------------------------------------------ --------------------
>
>
>> /*********************************************************** ********************
>> * Copyright (c) 2004 Actuate Corporation.
>> * All rights reserved. This program and the accompanying materials
>> * are made available under the terms of the Eclipse Public License v1.0
>> * which accompanies this distribution, and is available at
>> * http://www.eclipse.org/legal/epl-v10.html
>> *
>> * Contributors:
>> * Actuate Corporation - initial API and implementation
>> ************************************************************ *******************/
>>
>> package org.eclipse.birt.chart.demo.samples;
>>
>> import org.eclipse.swt.SWT;
>> import org.eclipse.swt.events.PaintEvent;
>> import org.eclipse.swt.events.PaintListener;
>> import org.eclipse.swt.events.SelectionEvent;
>> import org.eclipse.swt.events.SelectionListener;
>> import org.eclipse.swt.graphics.GC;
>> import org.eclipse.swt.graphics.Region;
>> import org.eclipse.swt.layout.GridData;
>> import org.eclipse.swt.layout.GridLayout;
>> import org.eclipse.swt.widgets.Button;
>> import org.eclipse.swt.widgets.Composite;
>> import org.eclipse.swt.widgets.Display;
>> import org.eclipse.swt.widgets.Shell;
>>
>> /**
>> *
>> */
>>
>> public class TestAdvance
>> {
>>
>> private static boolean blue = true;
>>
>> public static void main( String[] args )
>> {
>> swt( );
>> }
>>
>> static void swt( )
>> {
>> // DeviceData dd = new DeviceData( );
>> // dd.tracking = true;
>> // Display disp = new Display( dd );
>>
>> Display disp = Display.getDefault( );
>>
>> // Sleak sl = new Sleak( );
>> // sl.open( );
>>
>> Shell shl = new Shell( disp );
>>
>> shl.setSize( 700, 200 );
>>
>> drawArc( shl );
>>
>> shl.open( );
>>
>> while ( !shl.isDisposed( ) )
>> {
>> if ( !disp.readAndDispatch( ) )
>> {
>> disp.sleep( );
>> }
>> }
>>
>> disp.dispose( );
>>
>> }
>>
>> private static void drawArc( Shell shl )
>> {
>> shl.setLayout( new GridLayout( ) );
>>
>> Button btn = new Button( shl, SWT.PUSH );
>> btn.setText( "repaint" ); //$NON-NLS-1$
>> GridData gd = new GridData( );
>> gd.widthHint = 100;
>> gd.heightHint = 20;
>> btn.setLayoutData( gd );
>>
>> final Composite comp = new Composite( shl, SWT.NONE );
>>
>> comp.setLayoutData( new GridData( GridData.FILL_BOTH ) );
>>
>> comp.addPaintListener( new PaintListener( ) {
>>
>> public void paintControl( PaintEvent e )
>> {
>> GC gc = e.gc;
>>
>> gc.setBackground( blue ? Display.getDefault( )
>> .getSystemColor( SWT.COLOR_BLUE )
>> : Display.getDefault( ).getSystemColor( SWT.COLOR_RED ) );
>>
>> blue = !blue;
>>
>> gc.drawRectangle( 10, 10, 200, 100 );
>> gc.drawArc( 10, 10, 200, 100, -45, 45 );
>> gc.fillArc( 10, 10, 200, 100, 45, 90 );
>>
>> Region rg1, rg2;
>>
>> rg1 = new Region( Display.getDefault( ) );
>>
>> // gc.setClipping( 0, 0, 300, 1000 );
>> gc.getClipping( rg1 );
>>
>> // ==Enter Advanced Mode
>> gc.setAdvanced( false );
>> gc.setAntialias( 1 );
>> gc.setTextAntialias( 1 );
>> gc.setAlpha( 127 );
>>
>> gc.setClipping( rg1 );
>>
>> gc.drawRectangle( 220, 10, 200, 100 );
>> gc.drawArc( 220, 10, 200, 100, -45, 45 );
>> gc.fillArc( 220, 10, 200, 100, 45, 90 );
>>
>> rg2 = new Region( Display.getDefault( ) );
>> gc.getClipping( rg2 );
>> // rg2 = rg1;
>>
>> gc.setAdvanced( false );
>> // ====Leave Advanced Mode
>>
>> gc.setClipping( rg2 );
>>
>> gc.drawRectangle( 430, 10, 200, 100 );
>>
>> rg1.dispose( );
>> rg1 = null;
>>
>> rg2.dispose( );
>> rg2 = null;
>> }
>> } );
>>
>> btn.addSelectionListener( new SelectionListener( ) {
>>
>> public void widgetDefaultSelected( SelectionEvent e )
>> {
>> }
>>
>> public void widgetSelected( SelectionEvent e )
>> {
>> comp.redraw( );
>> }
>> } );
>>
>> }
>>
>> }
>>
>
>
Re: Is this a resource leak bug? [message #466163 is a reply to message #466154] Wed, 04 January 2006 02:55 Go to previous message
Zhiqiang Qian is currently offline Zhiqiang QianFriend
Messages: 76
Registered: July 2009
Member
Hi Rich,

Since calling gc.setAdvanced(true) will turn on all the advanced
features for all graphics operations, and what we want is just one or a
few of them, so we call setAdvance(false) first before those specific
advanced callings.

Here is what the JavaDoc of GC.setAdvanced() says:

/**
* Sets the receiver to always use the operating system's advanced graphics
* subsystem for all graphics operations if the argument is
<code>true</code>.
* If the argument is <code>false</code>, the advanced graphics
subsystem is
* no longer used, advanced graphics state is cleared and the normal
graphics
* subsystem is used from now on.
* <p>
* Normally, the advanced graphics subsystem is invoked automatically when
* any one of the alpha, antialias, patterns, interpolation, paths,
clipping
* or transformation operations in the receiver is requested. When the
receiver
* is switched into advanced mode, the advanced graphics subsystem
performs both
* advanced and normal graphics operations. Because the two subsystems are
* different, their output may differ. Switching to advanced graphics
before
* any graphics operations are performed ensures that the output is
consistent.
* </p>

Rich Kulp wrote:
> Ok. But that means the gc.setAdvanced(false) is unneeded because you
> would be turning it off and then turning it back on if it was already on
> because setAntialias automatically turns it on if it was not already on.
>
> Veronika Irvine wrote:
>> Calling gc.setAntialias( 1 ) uses GDI+ on Windows. So calling the
>> following code will print out "true":
>>
>> gc.getAdvanced(false);
>> gc.setAntialias(1);
>> System.out.println(gc.getAdvanced());
>>
>> To recreate the bug, you do need to cause the GC to use GDI+.
>>
>> "Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> wrote in message
>> news:dpemc4$lv0$1@utils.eclipse.org...
>>
>>> By the way, the code presented is not running under advanced mode:
>>
>>
>>
>
Previous Topic:dispose
Next Topic:ViewerSorter problem with a Table
Goto Forum:
  


Current Time: Sat Apr 27 05:17:12 GMT 2024

Powered by FUDForum. Page generated in 0.03604 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top