rawRectangle

fun rawRectangle(rectangle: Rectangle)(source)

Draws a raw rectangle: a quad that covers exactly the pixels whose centers lie inside the rectangle, without anti-aliasing and without a stroke. Use raw rectangles to run shade styles over a region of pixels, for computation or blitting, where rectangle would anti-alias the edges and draw outside of the rectangle.

Shade styles see the same inputs as for rectangle, c_boundsPosition spans [0, 1] over the rectangle.

Parameters

rectangle

the rectangle to draw


fun rawRectangle(x: Double, y: Double, width: Double, height: Double = width)(source)

Draws a raw rectangle, see rawRectangle

Parameters

x

The x-coordinate of the top-left corner of the rectangle.

y

The y-coordinate of the top-left corner of the rectangle.

width

The width of the rectangle.

height

The height of the rectangle. Defaults to the value of width if not specified.


fun rawRectangle(corner: Vector2, width: Double, height: Double = width)(source)

Draws a raw rectangle, see rawRectangle

Parameters

corner

The top-left corner of the rectangle.

width

The width of the rectangle.

height

The height of the rectangle. Defaults to the value of width if not specified.