geomerative index |
Name | RCommand
Examples |
    None available
Description |
Constructors |
    RCommand(c);
    RCommand(c, sp);
    RCommand(sp, ep);
    RCommand(spx, spy, epx, epy);
    RCommand(sp, cp1, ep);
    RCommand(spx, spy, cp1x, cp1y, epx, epy);
    RCommand(sp, cp1, cp2, ep);
    RCommand(spx, spy, cp1x, cp1y, cp2x, cp2y, epx, epy);
    RGeomElem();
Methods |
countControlPoints ( ) |  | Use this to return the number of control points of the curve.
draw ( ) |  | Use this method to draw the command.
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.
getCommandType ( ) |  | Use this to return the command type.
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 start, control and end points of the curve. It returns the points in the way of an array of RPoint.
getHeight ( ) |  | Use this method to get the height of the element.
getPoint ( ) |  | Use this to return a specific point on the curve. It returns the RPoint for a given advancement parameter t on the curve.
getPoints ( ) |  | Use this to return the points on the curve. It returns the points in the way of an array of RPoint.
getTangent ( ) |  | Use this to return a specific tangent on the curve. It returns the RPoint representing the tangent vector for a given value of the advancement parameter t on the curve.
getTangents ( ) |  | Use this to return the tangents on the curve. It returns the vectors in the form of an array of RPoint.
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.
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.
rotate ( ) |  | Use this to apply a rotation to the point.
scale ( ) |  | Use this to scale the point.
setSegmentAngle ( ) |  | Use this to set the segmentator angle tolerance for the ADAPTATIVE segmentator and set the segmentator to ADAPTATIVE.
setSegmentGraphic ( ) |  | Use this to set the segmentator graphic context.
setSegmentLength ( ) |  | Use this to set the segmentator length for the UNIFORMLENGTH segmentator and set the segmentator to UNIFORMLENGTH.
setSegmentOffset ( ) |  | Use this to set the segmentator offset for the UNIFORMLENGTH segmentator and set the segmentator to UNIFORMLENGTH.
setSegmentStep ( ) |  | Use this to set the segmentator step for the UNIFORMSTEP segmentator and set the segmentator to UNIFORMSTEP.
setSegmentator ( ) |  | Use this to set the segmentator type. ADAPTATIVE segmentator minimizes the number of segments avoiding perceptual artifacts like angles or cusps. Use this in order to have Polygons and Meshes with the fewest possible vertices. This can be useful when using or drawing a lot the same Polygon or Mesh deriving from this Shape. UNIFORMLENGTH segmentator is the slowest segmentator and it segments the curve on segments of equal length. This can be useful for very specific applications when for example drawing incrementaly a shape with a uniform speed. UNIFORMSTEP segmentator is the fastest segmentator and it segments the curve based on a constant value of the step of the curve parameter, or on the number of segments wanted. This can be useful when segmpointsentating very often a Shape or when we know the amount of segments necessary for our specific application.
split ( ) |  | Returns two commands resulting of splitting the command.
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 | Web & Application
Related |