Horus Doc || Java GUI Reference || Doxygen's quick Index  

CanvasCorbaPolyline2d Class Reference

Inheritance diagram for CanvasCorbaPolyline2d::

CanvasFigure CanvasObject List of all members.

Public Methods

 CanvasCorbaPolyline2d (HxCorba.Polyline2dData poly)

Protected Methods

Shape getShape ()
 Derived classes have to implement this method to supply the shape that represents the CanvasFigures. More...

boolean hitOnStroke ()
 Derived classes have to implement this method to indicate whether they are selected (hit) based on their stroke (border) or on their interior. More...


Constructor & Destructor Documentation

CanvasCorbaPolyline2d::CanvasCorbaPolyline2d HxCorba.Polyline2dData    poly [inline]
 

00025 {
00026     super(0., 0., 0., 0.);
00027     _poly = poly;
00028     updatePolyline();
00029     setInputSource(INP_CORBA);
00030 }


Member Function Documentation

Shape CanvasCorbaPolyline2d::getShape   [inline, protected, virtual]
 

Derived classes have to implement this method to supply the shape that represents the CanvasFigures.

It is used to draw to figure as well as determine which figure is selected (hit) by the cursor within a canvas.

Reimplemented from CanvasFigure.

00041 {
00042     int[] xp = getAddXCcs();
00043     int[] yp = getAddYCcs();
00044     GeneralPath path = new GeneralPath(GeneralPath.WIND_NON_ZERO, xp.length);
00045     path.moveTo(xp[0], yp[0]);
00046     for (int i=1 ; i < xp.length ; i++)
00047         path.lineTo(xp[i], yp[i]);
00048     return path;
00049 }

boolean CanvasCorbaPolyline2d::hitOnStroke   [inline, protected, virtual]
 

Derived classes have to implement this method to indicate whether they are selected (hit) based on their stroke (border) or on their interior.

Reimplemented from CanvasFigure.

00053 {
00054     return true;
00055 }


The documentation for this class was generated from the following file:
Generated on Tue Feb 3 14:19:38 2004 for JavaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001