Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

CanvasPolyline Class Reference

Inheritance diagram for CanvasPolyline::

ScribbleFigure ScribbleObject CanvasObject CanvasColoredPolyline List of all members.

Public Methods

 CanvasPolyline ()
 CanvasPolyline (double[] xpoints, double[]ypoints, int npoints)
 CanvasPolyline (double[] xpoints, double[] ypoints, int npoints, Color color)
 CanvasPolyline (double[] xpoints, double[] ypoints, int npoints, Color color, boolean closed)
 CanvasPolyline (double[] xpoints, double[] ypoints, int npoints, int mode, Color color, boolean stroke, float linew, float trans, boolean closed, double ccs_scale)
void draw (Graphics g)
 Draw CanvasObject on 'g', using internal CCS values. More...

Object clone ()
 Return an identical copy of this CanvasObject. More...

boolean isInside (double x, double y)
boolean isNear (double x, double y)
void setDimension (double w, double h)
 Resize CanvasObject to width 'w' and height 'h'. 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...

void addPoint (double x, double y)
boolean removePoint (int index)
boolean removeLastPoint ()
boolean isClosed ()
void setClosed (boolean b)
double[] getXPoints ()
double[] getYPoints ()
int getNrPoints ()
void pointsToMediator ()
void makeBSpline (int degree)
Vector getVisualChangeMethods ()
 Builds up a list of functions that are to fill a menu for changing the visualization aspects of an object. More...

 CanvasPolyline (int[] xpoints, int[] ypoints, int npoints, int mode, Color color, boolean closed, double ccs_scale)
boolean isInsideCcs (int x, int y)
 To be removed. More...

boolean isNearCcs (int x, int y)
 To be removed. More...

void setDimension (int w, int h)
void doMove (int w, int h)
int changePoint (int index, int x, int y)
void addPoint (int x, int y)
void removeRedundantPoints ()
int[] getCcsXPoints ()
int[] getCcsYPoints ()

Protected Methods

void initPoly (double[] xpoints, double[] ypoints, int npoints, boolean closed)
void transformICStoCCS ()
 Perform a full ICS to CCS coordinate transformation. More...

void transformCCStoICS ()
 Perform a full CCS to ICS coordinate transformation. More...

void setBox ()

Protected Attributes

double[] ics_xPoints
double[] ics_yPoints
Polygon ccs_poly
boolean closed = false

Constructor & Destructor Documentation

CanvasPolyline::CanvasPolyline   [inline]
 

CanvasPolyline::CanvasPolyline double    xpoints[],
doubleypoints   [],
int    npoints
[inline]
 

CanvasPolyline::CanvasPolyline double    xpoints[],
double    ypoints[],
int    npoints,
Color    color
[inline]
 

CanvasPolyline::CanvasPolyline double    xpoints[],
double    ypoints[],
int    npoints,
Color    color,
boolean    closed
[inline]
 

CanvasPolyline::CanvasPolyline double    xpoints[],
double    ypoints[],
int    npoints,
int    mode,
Color    color,
boolean    stroke,
float    linew,
float    trans,
boolean    closed,
double    ccs_scale
[inline]
 

CanvasPolyline::CanvasPolyline int    xpoints[],
int    ypoints[],
int    npoints,
int    mode,
Color    color,
boolean    closed,
double    ccs_scale
[inline]
 


Member Function Documentation

void CanvasPolyline::draw Graphics    g [inline, virtual]
 

Draw CanvasObject on 'g', using internal CCS values.

Reimplemented from CanvasObject.

Reimplemented in CanvasColoredPolyline.

Object CanvasPolyline::clone   [inline, virtual]
 

Return an identical copy of this CanvasObject.

Reimplemented from CanvasObject.

Reimplemented in CanvasColoredPolyline.

boolean CanvasPolyline::isInside double    x,
double    y
[inline]
 

boolean CanvasPolyline::isNear double    x,
double    y
[inline]
 

void CanvasPolyline::setDimension double    w,
double    h
[inline]
 

Resize CanvasObject to width 'w' and height 'h'.

Parameters are assumed Image Coordinate System values.

Reimplemented from ScribbleObject.

void CanvasPolyline::doPixelFit double    zoomFactor [inline]
 

Round internal ICS values to nearest natural number.

Although the ICS values are changed, they are not converted to 'integer' internally.

Reimplemented from ScribbleObject.

void CanvasPolyline::doMove double    w,
double    h
[inline]
 

Move CanvasObject 'w' positions in x-direction, and 'h' posi- tions in y-direction.

Parameters are assumed Image Coordinate System values.

Reimplemented from ScribbleObject.

void CanvasPolyline::addPoint double    x,
double    y
[inline]
 

Reimplemented from ScribbleFigure.

boolean CanvasPolyline::removePoint int    index [inline]
 

Reimplemented from ScribbleFigure.

Reimplemented in CanvasColoredPolyline.

boolean CanvasPolyline::removeLastPoint   [inline]
 

Reimplemented from ScribbleFigure.

boolean CanvasPolyline::isClosed   [inline]
 

void CanvasPolyline::setClosed boolean    b [inline]
 

double [] CanvasPolyline::getXPoints   [inline]
 

double [] CanvasPolyline::getYPoints   [inline]
 

int CanvasPolyline::getNrPoints   [inline]
 

void CanvasPolyline::pointsToMediator   [inline]
 

void CanvasPolyline::makeBSpline int    degree [inline]
 

Vector CanvasPolyline::getVisualChangeMethods   [inline]
 

Builds up a list of functions that are to fill a menu for changing the visualization aspects of an object.

Classes derived from this one typically add their class-specific methods to their parents' methods by first calling the parent to fill the vector and then add their own. The result is a Vector of CallableMethods.

Reimplemented from ScribbleFigure.

boolean CanvasPolyline::isInsideCcs int    x,
int    y
[inline]
 

To be removed.

Reimplemented from CanvasObject.

boolean CanvasPolyline::isNearCcs int    x,
int    y
[inline]
 

To be removed.

Reimplemented from CanvasObject.

void CanvasPolyline::setDimension int    w,
int    h
[inline]
 

Reimplemented from ScribbleObject.

void CanvasPolyline::doMove int    w,
int    h
[inline]
 

Reimplemented from ScribbleObject.

int CanvasPolyline::changePoint int    index,
int    x,
int    y
[inline]
 

Reimplemented from ScribbleFigure.

void CanvasPolyline::addPoint int    x,
int    y
[inline]
 

Reimplemented from ScribbleFigure.

void CanvasPolyline::removeRedundantPoints   [inline]
 

int [] CanvasPolyline::getCcsXPoints   [inline]
 

int [] CanvasPolyline::getCcsYPoints   [inline]
 

void CanvasPolyline::initPoly double    xpoints[],
double    ypoints[],
int    npoints,
boolean    closed
[inline, protected]
 

void CanvasPolyline::transformICStoCCS   [inline, protected]
 

Perform a full ICS to CCS coordinate transformation.

Reimplemented from CanvasObject.

Reimplemented in CanvasColoredPolyline.

void CanvasPolyline::transformCCStoICS   [inline, protected]
 

Perform a full CCS to ICS coordinate transformation.

This function is used only for scribbled objects.

Reimplemented from CanvasObject.

Reimplemented in CanvasColoredPolyline.

void CanvasPolyline::setBox   [inline, protected]
 


Member Data Documentation

double [] CanvasPolyline::ics_xPoints [protected]
 

double [] CanvasPolyline::ics_yPoints [protected]
 

Polygon CanvasPolyline::ccs_poly [protected]
 

boolean CanvasPolyline::closed = false [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Jan 8 14:14:24 2002 for JavaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001