Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] (no subject)


You've guess it "bad" means wrong circles are drawn for rounded corner of rectangle.
I've just filled the Bug #120524 for this problem.

Thank you !

Arnaud.


Steve Northover <Steve_Northover@xxxxxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

12/12/2005 06:14 PM

Please respond to
"Eclipse Platform SWT component developers list."

To
"Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>
cc
Subject
Re: [platform-swt-dev] (no subject)






Please enter a bug report with the code and describe exactly what you mean by bad (ie. it's the black circle lines, right?).  Thanks.



Arnaud De Muyser <ademuyser@xxxxxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

12/12/2005 08:47 AM

Please respond to
"Eclipse Platform SWT component developers list."

To
platform-swt-dev@xxxxxxxxxxx
cc
Subject
[platform-swt-dev] (no subject)








Hi !

I'm using eclipse 3.1 on Windows XP, when I draw round rectangles

sometimes the rounded corners are drawn badly specially when Transform is used.

Here is a snapshot of bad drawing :




Does anyone have seen yet ?


Thanks for any informations.


Arnaud.


PS: used code to reproduce problem:


package test1;


import org.eclipse.swt.events.PaintEvent;

import org.eclipse.swt.events.PaintListener;

import org.eclipse.swt.graphics.Color;

import org.eclipse.swt.graphics.Transform;

import org.eclipse.swt.widgets.Display;

import org.eclipse.swt.widgets.Shell;


public class RoundRect

{

      public static void main(String[] args)
      {

              Display disp = new Display();

              Shell shell = new Shell( disp );

              shell.setSize( 400, 300 );

      shell.addPaintListener( new PaintListener() {

                      public void paintControl(PaintEvent e) {

                              Transform tr = new Transform( e.display );

//same effect:                                tr.translate( 0,0 );

                              tr.translate( 5,5 );

                              e.gc.setTransform( tr );

                              e.gc.setBackground( new Color(null,255,0,0));

                              e.gc.fillRoundRectangle( 0,0, 142, 90, 90,90 );                                

                              e.gc.drawRoundRectangle( 0,0, 142, 90, 90,90 );

                              e.gc.setTransform( null );

                              tr.dispose();

                      }

      });

     
      shell.open ();

      while (!shell.isDisposed ()) {

              if (!disp.readAndDispatch ())

                      disp.sleep ();

      }

      disp.dispose ();

      }


}
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top