nsISVGRendererPathBuilder

IID:c3cd294e-39ae-4718-b2bc-87c0fad97a12
Inherits From:nsISupports

\addtogroup renderer_interfaces Rendering Engine Interfaces One of a number of interfaces (all starting with nsISVGRenderer*) to be implemented by an SVG rendering engine. See nsISVGRenderer for more details.

This interface is used by an nsISVGRendererPathGeometry object in a call to nsISVGPathGeometrySource::constructPath() to obtain a native representation of the path described by nsISVGPathGeometrySource.


Methods

void arcto ( float x , float y , float r1 , float r2 , float angle , PRBool largeArcFlag , PRBool sweepFlag ) void closePath ( out float newX , out float newY ) void curveto ( float x , float y , float x1 , float y1 , float x2 , float y2 ) void endPath ( ) void lineto ( float x , float y ) void moveto ( float x , float y )

void arcto ( float x , float y , float r1 , float r2 , float angle , PRBool largeArcFlag , PRBool sweepFlag )

Draw an elliptical arc from the current position to (x,y). Advance current position to (x,y).

Arguments:
x: X-coordinate of end point (untransformed).
y: Y-coordinate of end point (untransformed).
r1: Radius of ellipse in X direction (untransformed).
r2: Radius of ellipse in Y direction (untransformed).
angle: Rotation of ellipse as a whole (untransformed).
largeArcFlag: PR_TRUE: choose the large arc (>=180 degrees), PR_FALSE: choose the smaller arc (<=180 degrees)
sweepFlag: PR_TRUE: sweep in positive angle direction, PR_FALSE: sweep in negative angle direction

void closePath ( out float newX , out float newY )

Close the current subpath. Move current position back to beginning of subpath.

Arguments:
newX: X-coordinate of new current position (untransformed).
newY: Y-coordinate of new current position (untransformed).

void curveto ( float x , float y , float x1 , float y1 , float x2 , float y2 )

Draw cubic Bezier curve from the current position to (x,y) using (x1,y1) as the control point at the beginning og the curve and (x2,y2) as the control point at the end of the curve. Advance current position to (x,y).

Arguments:
x: X-coordinate of end point (untransformed).
y: Y-coordinate of end point (untransformed).
x1: X-coordinate of first control point (untransformed).
y1: Y-coordinate of first control point (untransformed).
x2: X-coordinate of second control point (untransformed).
y2: Y-coordinate of second control point (untransformed).

void endPath ( )

End the path description. Guaranteed to be the last function called.


void lineto ( float x , float y )

Draw a straight line from the current position to (x,y). Advance current position to (x,y).

Arguments:
x: X-coordinate of end point (untransformed).
y: Y-coordinate of end point (untransformed).

void moveto ( float x , float y )

Move current position and start new sub-path.

Arguments:
x: X-coordinate (untransformed).
y: Y-coordinate (untransformed).

References

This interface is passed as an argument to the following methods:

nsISVGPathGeometrySource.constructPath

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com