geomerative index
Name RContour
Examples
None available
Description RContour is a reduced interface for creating, holding and drawing contours. Contours are ordered lists of points (RPoint) which define the outlines of polygons. Contours can be self-intersecting.
Constructors
RContour();
RContour(c);
RGeomElem();
Fields
points   Array of RPoint objects holding the points of the contour.

Methods
addPoint ( )   Use this method to add new points to the contour.

addPoints ( )   Efficiently add a list of points to the contour.

countPoints ( )   Use this method to count the number of points in the contour.

draw ( )   Use this method to draw the contour.

getArea ( )   Use this method to get the area of an element.

getBounds ( )   Use this method to get the bounding box of the element.

getCenter ( )   Use this method to get the center point of the element.

getCenteringTransf ( )   Use this method to get the transformation matrix in order to fit and center the element on the canvas. Scaling and translation damping parameters are available, in order to create animations.

getCentroid ( )   Use this method to get the centroid of the element.

getCurveLength ( )   Use this to return the points on the curve. It returns the points in the way of an array of RPoint.

getCurveLengths ( )   Use this to return the points on the curve. It returns the points in the way of an array of RPoint.

getHandles ( )   Use this to return the points of the contour. It returns the points in the way of an array of RPoint.

getHeight ( )   Use this method to get the height of the element.

getPoints ( )   Use this to return the points of the contour. It returns the points in the way of an array of RPoint.

getType ( )   Use this method to get the type of element this is.

getWidth ( )   Use this method to get the width of the element.

getX ( )   Use this method to get the x (left side position) of the element.

getY ( )   Use this method to get the y (left side position) of the element.

isHole ( )   Use this method to know if the contour is a hole. Remember to use the method update() on the polygon before using this method.

isIn ( )   Use this method to know if the shape is inside a graphics object. This might be useful if we want to delete objects that go offscreen.

print ( )   Use this method to transform the contour.

rotate ( )   Use this to apply a rotation to the point.

scale ( )   Use this to scale the point.

transform ( )   Transform the geometric object to fit in a rectangle defined by the parameters passed.

translate ( )   Use this to apply a translation to the point.

Usage Geometry
Related RPoint
RPolygon