Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Running ControlExample example program failsunderHP-UX


Sridhar,

This means we need to proceed with an OS.* calls test.
Steve:  you have a pile of those in your image, could you share one?

P.S.: Drawing to Canvas vs. Shell should make no difference, as Shells are Canvases.



Sridhar Bidigalu <sridhar@xxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

02/28/2002 01:29 PM
Please respond to platform-swt-dev

       
        To:        platform-swt-dev@xxxxxxxxxxx
        cc:        
        Subject:        Re: [platform-swt-dev] Running ControlExample example program  failsunderHP-UX




Grant,

I modified the sample examples you sent with ...

e.gc.drawPolyline(points);

and it draws the polyline.  Looks like fillPolygon fails to draw.
Same behavior on the canvas too. But, it does not hang as it use
to, running the "controlexample" or the "eclipse" itself using the
fillPolygon, shell popsup without fillPolygon.

-Sri

Grant_Gayed@xxxxxxx wrote:

> Sridhar,
>
> Can you try the following shorter example and let us know if it hangs:
>
> import org.eclipse.swt.events.*;
> import org.eclipse.swt.graphics.*;
> import org.eclipse.swt.widgets.*;
>
> public class TestFillPolygon {
>       public static void main (String[] args) {
>             final int[] points = new int[] {771,6,771,16,766,11};
>             final Display display = new Display ();
>             Shell shell = new Shell (display);
>             shell.setBounds (10, 10, 800, 90);
>             shell.addPaintListener(new PaintListener () {
>                   public void paintControl (PaintEvent e) {
>                         Color colour = new Color(display,new
> RGB(222,233,244));
>                         e.gc.setBackground(colour);
>                         colour.dispose();
>                         e.gc.fillPolygon(points);
>                   }
>             });
>             shell.open ();
>             while (!shell.isDisposed ()) {
>                   if (!display.readAndDispatch ()) display.sleep ();
>             }
>             display.dispose ();
>       }
> }
>
> Grant
>
> Mike,
>
> Thanks for the response. Yes, the arguments look reasonable enough and I
> have already gone
> thru. listing out the <xy> points, the drawable, display and the GC with
> their respective style
> and mode, which is the default(Complex & CoordModeOrigin). Also, tried with
> the different
> combinations of shape and mode arguments, no change. Created a simple
> example C program,
> which contains the same points as the one in the controlexample program,
> and the XFillPolygon
> works fine. I have attached the controlexample log file where it list out
> the debug info. of the
> JNI code before hanging in XFillPolygon. And also, note that, by replacing
> it with XDrawLines
> draws the lines on the arrow button of the Tab widget and runs the
> controlexample pgm just
> fine.
>
> I will go thru. more thoroughly on the HP documentation for any hints or
> specifics for the above
> problem to occur.
>
> Thanks
> -Sri
>
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/platform-swt-dev

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



Back to the top