Class: PathOutput

algeobraCanvas~PathOutput()

Generic output for drawing paths

Constructor

new PathOutput()

Source:

Members

height

Height of the output surface
Source:

width

Width of the output surface
Source:

Methods

begin()

Begin the current output frame
Source:

beginGroup()

Start a group
Source:

drawLine(x0, y0, x1, y1, params)

Draw a line
Parameters:
Name Type Description
x0 Number The start x coordinate
y0 Number The start y coordinate
x1 Number The end x coordinate
y1 Number The end y coordinate
params Object The style
Properties
Name Type Description
fill Boolean Whether to fill or not
stroke Boolean Whether to stroke or not
style Object The style
Source:

drawPath(path, params)

Draw a given path
Parameters:
Name Type Description
path DrawPath The path to be drawn
params Object The style
Properties
Name Type Description
fill Boolean Whether to fill or not
stroke Boolean Whether to stroke or not
style Object The style
Source:

drawRect(x, y, width, height, params)

Draw a rectangle
Parameters:
Name Type Description
x Number The lower x coordinate
y Number The lower y coordinate
width Number The width
height Number The height
params Object The style
Properties
Name Type Description
fill Boolean Whether to fill or not
stroke Boolean Whether to stroke or not
style Object The style
Source:

drawText(text, params)

Draw text
Parameters:
Name Type Description
text DrawPath The text to be drawn
params Object The style
Properties
Name Type Description
fill Boolean Whether to fill or not
stroke Boolean Whether to stroke or not
style Object The style
Source:

end()

Finish the current output frame
Source:

endGroup()

End a group
Source: