Inheritance diagram for CanvasCorbaPolyline2d::
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... |
|
00025 { 00026 super(0., 0., 0., 0.); 00027 _poly = poly; 00028 updatePolyline(); 00029 setInputSource(INP_CORBA); 00030 } |
|
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 } |
|
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 } |