Context.rectangle

Adds a closed sub-path rectangle of the given size to the current path at position (x, y) in user-space coordinates. Since 1.0

class Context
void
rectangle
(
double x
,
double y
,
double width
,
double height
)

Parameters

x double

the X coordinate of the top left corner of the rectangle

y double

the Y coordinate to the top left corner of the rectangle

width double

the width of the rectangle

height double

the height of the rectangle

Meta