Inheritance diagram for ScribbleObject::
Public Methods | |
ScribbleObject (double x, double y, double w, double h) | |
Create ScribbleObject with top-left corner of bounding box at position (x, y), and size (w, h). More... | |
ScribbleObject (double x, double y, double w, double h, int mode) | |
Create ScribbleObject with top-left corner of bounding box at position (x, y), size (w, h), and drawmode 'mode'. More... | |
ScribbleObject (double x, double y, double w, double h, int mode, double ccs_scale) | |
Create ScribbleObject with top-left corner of bounding box at position (x, y), size (w, h), drawmode 'mode', and scalefactor 'ccs_scale' (used for conversion between the Image Coordinate System and the Canvas Coordinate System). More... | |
void | setDimension (double w, double h) |
Resize CanvasObject to width 'w' and height 'h'. More... | |
void | setPosition (double x, double y) |
Place top left position of CanvasObject's bounding box at position (x, y). More... | |
void | doPixelFit (double zoomFactor) |
Round internal ICS values to nearest natural number. More... | |
void | doMove (double w, double h) |
Move CanvasObject 'w' positions in x-direction, and 'h' posi- tions in y-direction. More... | |
ScribbleObject (int x, int y, int w, int h, int mode, double ccs_scale) | |
void | setPosition (int x, int y) |
void | setDimension (int w, int h) |
void | doMove (int w, int h) |
|
Create ScribbleObject with top-left corner of bounding box at position (x, y), and size (w, h). Parameters are assumed Image Coordinate System values.
00032 { 00033 super(x, y, x+w, y+h); 00034 } |
|
Create ScribbleObject with top-left corner of bounding box at position (x, y), size (w, h), and drawmode 'mode'. Parameters are assumed Image Coordinate System values.
00042 { 00043 super(x, y, x+w, y+h, mode); 00044 } |
|
Create ScribbleObject with top-left corner of bounding box at position (x, y), size (w, h), drawmode 'mode', and scalefactor 'ccs_scale' (used for conversion between the Image Coordinate System and the Canvas Coordinate System). Parameters are assumed Image Coordinate System values. Related CCS values are calculated according to 'ccs_scale'.
00056 { 00057 super(x, y, x+w, y+h, mode, ccs_scale); 00058 } |
|
00146 { 00147 super(x, y, x+w, y+h, mode, ccs_scale); 00148 } |
|
Resize CanvasObject to width 'w' and height 'h'. Parameters are assumed Image Coordinate System values. Reimplemented in CanvasArrow, CanvasArrowGrid, CanvasBlob, CanvasChain, CanvasFigureAggregate, CanvasLine, CanvasMask, CanvasOval, CanvasPoint, CanvasPolyline, CanvasRectangle, and CanvasString.
|
|
Place top left position of CanvasObject's bounding box at position (x, y). Parameters are assumed Image Coordinate System values. Reimplemented in CanvasArrow.
|
|
Round internal ICS values to nearest natural number. Although the ICS values are changed, they are not converted to 'integer' internally. Reimplemented in CanvasBlob, CanvasChain, CanvasFigureAggregate, CanvasLine, CanvasMask, CanvasOval, CanvasPoint, CanvasPolyline, CanvasRectangle, and CanvasString.
00098 { 00099 // Round ICS values... 00100 00101 setX1(Math.round(getX1())); 00102 setY1(Math.round(getY1())); 00103 setWidth(Math.round(getWidth())); 00104 setHeight(Math.round(getHeight())); 00105 setStartX(Math.round(getStartX())); 00106 setStartY(Math.round(getStartY())); 00107 00108 setZoomFactor(zoomFactor); 00109 setTransformOK(false); 00110 } |
|
Move CanvasObject 'w' positions in x-direction, and 'h' posi- tions in y-direction. Parameters are assumed Image Coordinate System values. Reimplemented in CanvasArrowGrid, CanvasBlob, CanvasChain, CanvasFigureAggregate, CanvasLine, and CanvasPolyline.
|
|
Reimplemented in CanvasArrow.
00152 { 00153 if (!getTransformOK()) { 00154 transformICStoCCS(); 00155 } 00156 doMove(x-getX1Ccs(), y-getY1Ccs()); 00157 } |
|
Reimplemented in CanvasArrow, CanvasArrowGrid, CanvasBlob, CanvasChain, CanvasFigureAggregate, CanvasLine, CanvasMask, CanvasOval, CanvasPoint, CanvasPolyline, CanvasRectangle, and CanvasString.
00161 { 00162 if (!getTransformOK()) { 00163 transformICStoCCS(); 00164 } 00165 00166 setX1Ccs(getStartXCcs()); 00167 setY1Ccs(getStartYCcs()); 00168 00169 if (w < 0) { 00170 w = -w; 00171 setX1Ccs(getX1Ccs() - w); 00172 } 00173 if (h < 0.) { 00174 h = -h; 00175 setY1Ccs(getY1Ccs() - h); 00176 } 00177 setWidthCcs(w); 00178 setHeightCcs(h); 00179 00180 transformCCStoICS(); 00181 } |
|
Reimplemented in CanvasArrow, CanvasArrowGrid, CanvasBlob, CanvasChain, CanvasFigureAggregate, CanvasLine, and CanvasPolyline.
00185 { 00186 if (!getTransformOK()) { 00187 transformICStoCCS(); 00188 } 00189 00190 setX1Ccs(getX1Ccs() + w); 00191 setY1Ccs(getY1Ccs() + h); 00192 setStartXCcs(getStartXCcs() + w); 00193 setStartYCcs(getStartYCcs() + h); 00194 setX2Ccs(getX2Ccs() + w); 00195 setY2Ccs(getY2Ccs() + h); 00196 00197 transformCCStoICS(); 00198 } |