Drawer
The Drawer
class is a utility that provides various drawing operations such as drawing shapes, transformations, and managing drawing states in a graphical rendering context. It serves as the primary interface for rendering graphics and provides control for styling and transformations.
Properties
Provides the current drawing context for rendering operations. This includes information about the model matrix, view matrix, projection matrix, the active render target's dimensions, content scale, and the model-view scaling factor. The provided context is dynamically derived based on the active rendering state.
When two line segments meet at a sharp angle and miter joins have been specified for lineJoin, it is possible for the miter to extend far beyond the thickness of the line stroking the path. The miterlimit imposes a limit on the ratio of the miter length to the strokeWeight.
Represents a 4x4 transformation matrix used for projection in graphics rendering. Typically utilized in 3D rendering to define views, perspectives, or transformations. Defaults to the identity matrix, meaning no transformation is applied.
The active stroke weight
Functions
Draws a circle on the given context using the specified draw style and circle properties.
Draws a circle at the specified position with the given radius.
Draws a circle with the specified parameters.
Create a stored batch of circles
Draws a batch of circles on a canvas using the provided building instructions.
Draws the given list of circles using the specified drawing context and style.
Draws multiple circles at specified positions with a given radius.
Draws multiple circles on a given context using specified positions and radii.
Draws multiple circles in a batch using the specified drawing context and style.
Draws a single ShapeContour using fill, stroke and strokeWeight settings
Draws org.openrndr.shape.contours using fill, stroke and strokeWeight settings
Draws an image with its top-left corner at (0,0)
Draws an image onto the specified context using the provided color buffer and rectangles.
Draws an image (ColorBuffer) into a target area
Draws an image using the given array texture, layers, and mapping of rectangles.
Draws a source area of an image (ColorBuffer) into a target area
Draws an image from a specified layer of an ArrayTexture onto a target rectangle.
Draws an image using an ArrayTexture as source
Executes the given function within an isolated drawing context bound to the specified render target.
Renders a list of line loops based on the current drawing style and quality settings.
Draws a series of line loops based on the provided list of loops.
Renders a series of line loops with specified weights.
Draws line loops in either performance or quality mode based on the current draw style.
Draws a line segment using the specified LineSegment
.
Draws a line segment between two points in a 2D space.
Sets the projection matrix to orthogonal using the drawer's current size
Sets the projection matrix to orthogonal using the sizes of a RenderTarget
Sets the projection to a perspective projection matrix
Create a stored batch of points
Draws a batch of points using the provided configuration builder.
Draws a list of 2D points using the specified context and draw style.
Draws a list of 3D points using the specified drawing style and context.
Draws a specified number of points from the given point batch.
Pop the active projection matrix from the projection state stack
Pop the active the model, view and projection matrices from their respective stacks
Push the active projection matrix on the projection state stack
Push the active model, view and projection matrices on their respective stacks
Draws a rectangle based on the specified properties.
Draws a rectangle on the canvas using the specified parameters.
Draws a rectangle on the canvas based on the provided position and dimensions.
Create a stored batch of rectangles
Facilitates the construction and rendering of rectangles in a batch process.
Draws a list of rectangles on the specified context using the given draw style.
Draws multiple rectangles based on the specified positions and dimensions.
Draws a specified number of rectangles from the given rectangle batch.
Draws a set of rectangles based on the given positions and dimensions.
Rotates the target by the specified angle in degrees around the Z-axis.
Rotates a transformation using the specified axis and angle in degrees, applying the rotation to the given transformation target.
Scales the target transformation uniformly along all axes by the given scalar value.
Applies non-uniform scale to the model matrix
Scales a transformation matrix by the specified factors along the x, y, and z axes.
Draws a list of 2D segments
Draws a list of 3D segments
Draws a list of 3D segments, each with their weight and color
Applies a translation transformation to the specified target.
Translates a point or object by the given x and y offsets.
Translates the target by the specified x, y, and z values.
Draws the specified vertex buffers using the given draw primitive and parameters.
Draws a VertexBuffer using primitive
Draws a vertex buffer using the specified parameters.
Issues a draw call for rendering geometry using multiple vertex buffers with instancing.
Draws instances of a vertex buffer with the specified parameters.