Blend2D
2D Vector Graphics Engine
Creates a default constructed rendering context.
Default constructed means that the instance is valid, but uninitialized, which means the rendering context does not have attached any target. Any attempt to use uninitialized context results in BL_ERROR_NOT_INITIALIZED error.
Move constructor.
Moves the other
rendering context into this one and resets the other
rendering context to a default-constructed state. This is an efficient way of "moving" the rendering context as it doesn't touch its internal reference count, which is atomic, because moving is internally implemented as a trivial memory copy.
Copy constructor.
Creates a weak-copy of the other
rendering context by increasing it's internal reference counter. This context and other
would point to the same data and would be otherwise identical. Any change to other
would also affect this context.
This function is mostly provided for C++ users that may keep a global reference to the same rendering context, for example, otherwise sharing is not that useful as the rendering context has states that are manipulated during rendering.
Two weak copies of the same rendering context cannot be used by different threads simultaneously.
Creates a new rendering context for rendering to the image target
.
This is a simplified constructor that can be used to create a rendering context without any additional parameters, which means that the rendering context will use a single-threaded synchronous rendering.
Creates a new rendering context for rendering to the image target
.
This is an advanced constructor that can be used to create a rendering context with additional parameters. These parameters can be used to specify the number of threads to be used during rendering and to select other features.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Destroys the rendering context.
Waits for all operations, detaches the target from the rendering context and then destroys it. Does nothing if the context is not initialized.
flush(BL_CONTEXT_FLUSH_SYNC)
, which would flush the render calls queue in case multi-threaded rendering is used. Returns true if the rendering context is initialized (has target attached).
Provided for users that want to use bool idiom in C++ to check for the status of the object.
Implements a copy-assignment operator.
Copying a rendering context creates a weak-copy only, which means that all copied instances share the same underlying rendering context. The rendering context internally uses atomic reference counting to manage ots lifetime.
Implements a move-assignment operator.
Moves the rendering context of other
to this rendering context and makes the other
rendering context default constructed (which uses an internal "null" implementation that renders to nothing).
Returns whether this and other
point to the same rendering context.
Returns whether this and other
are different rendering contexts.
Returns the target size in abstract units (pixels in case of BLImage).
Returns the target width in abstract units (pixels in case of BLImage).
Returns the target height in abstract units (pixels in case of BLImage).
Returns the target image or null if there is no target image.
begin()
function. So the returned pointer is not the same as the pointer passed to begin()
, but it points to the same underlying data. Returns the type of this context, see BLContextType.
Tests whether the context is a valid rendering context that has attached target to it.
Returns whether this and other
point to the same rendering context.
Resets this rendering context to the default constructed one.
Similar behavior to the destructor, but the rendering context will still be a valid object after the call to reset()
and would behave like a default constructed context.
Assigns the other
rendering context to this rendering context.
This is the same as using C++ copy-assignment operator, see operator=().
Moves the other
rendering context to this rendering context, which would make ther other
rendering context default initialized.
This is the same as using C++ move-assignment operator, see operator=().
Begins rendering to the given image
.
This is a simplified begin()
function that can be used to create a rendering context without any additional parameters, which means that the rendering context will use a single-threaded synchronous rendering.
If this operation succeeds then the rendering context will have exclusive access to the image data. This means that no other renderer can use it during rendering.
Begins rendering to the given image
.
This is an advanced begin()
function that can be used to create a rendering context with additional parameters. These parameters can be used to specify the number of threads to be used during rendering and to select other features.
If this operation succeeds then the rendering context will have exclusive access to the image data. This means that no other renderer can use it during rendering.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Waits for completion of all render commands and detaches the rendering context from the rendering target. After end()
completes the rendering context implementation would be released and replaced by a built-in null instance (no context).
end()
would implicitly call flush(BL_CONTEXT_FLUSH_SYNC)
, which would flush the render calls queue in case multi-threaded rendering is used. Flushes the context, see BLContextFlushFlags.
Gets a property of the given name
and assigns it to an initialized valueOut
.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Sets a property of the given name
to value
.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Queries the number of threads that the rendering context uses.
If the returned value is zero it means that the rendering is synchronous, otherwise it describes the number of threads used for asynchronous rendering which include the user thread. For example if the returned value is 2
it means that the rendering context uses the user thread and one more worker.
Queries accumulated errors as flags, see BLContextErrorFlags.
Errors may accumulate during the lifetime of the rendering context.
Returns the number of saved states in the context (0 means no saved states).
restore()
decrements it. However, the calls must be successful as the rendering context allows to restrict the number of save states, for example, or to use a BLContextCookie to guard state save and restoration. Saves the current rendering context state and creates a restoration cookie
.
If you use a cookie
to save a state you have to use the same cookie to restore it otherwise the restore() would fail. Please note that cookies are not a means of security, they are provided for making it easier to guarantee that a code that you may not control won't break your context.
Restores the top-most saved context-state.
Possible return conditions:
Restores to the point that matches the given cookie
.
More than one state can be restored in case that the cookie
points to some previous state in the list.
Possible return conditions:
Returns a meta transformation matrix.
Meta matrix is a core transformation matrix that is normally not changed by transformations applied to the context. Instead it acts as a secondary matrix used to create the final transformation matrix from meta and user matrices.
Meta matrix can be used to scale the whole context for HI-DPI rendering or to change the orientation of the image being rendered, however, the number of use-cases is unlimited.
To change the meta-matrix you must first change user-matrix and then call userToMeta()
, which would update meta-matrix and clear user-matrix.
See userTransform()
and userToMeta()
.
Returns a user transformation matrix.
User matrix contains all transformations that happened to the rendering context unless the context was restored or userToMeta()
was called.
Returns a final transformation matrix.
Final transformation matrix is a combination of meta and user transformation matrices. It's the final transformation that the rendering context applies to all input coordinates.
Sets user transformation matrix to m
.
transform
. Resets user transformation matrix to identity.
Translates the used transformation matrix by [x, y]
.
Translates the used transformation matrix by [p]
(integer).
Translates the used transformation matrix by [p]
(floating-point).
Scales the user transformation matrix by xy
(both X and Y is scaled by xy
).
Scales the user transformation matrix by [x, y]
.
Scales the user transformation matrix by [p]
(integer).
Scales the user transformation matrix by [p]
(floating-point).
Skews the user transformation matrix by [x, y]
.
Skews the user transformation matrix by [p]
(floating-point).
Rotates the user transformation matrix by angle
.
Rotates the user transformation matrix at [x, y]
by angle
.
Rotates the user transformation matrix at origin
(integer) by angle
.
Rotates the user transformation matrix at origin
(floating-point) by angle
.
Transforms the user transformation matrix by transform
.
Post-translates the used transformation matrix by [x, y]
.
Post-Translates the used transformation matrix by [p]
(integer).
Post-translates the used transformation matrix by [p]
(floating-point).
Post-scales the user transformation matrix by xy
(both X and Y is scaled by xy
).
Post-scales the user transformation matrix by [x, y]
.
Post-scales the user transformation matrix by [p]
(integer).
Post-scales the user transformation matrix by [p]
(floating-point).
Skews the user transformation matrix by [x, y]
.
Skews the user transformation matrix by [p]
(floating-point).
Rotates the user transformation matrix by angle
.
Rotates the user transformation matrix at [x, y]
by angle
.
Rotates the user transformation matrix at origin
(integer) by angle
.
Rotates the user transformation matrix at origin
(floating-point) by angle
.
Transforms the user transformation matrix by transform
.
Stores the result of combining the current MetaTransform
and UserTransform
to MetaTransform
and resets UserTransform
to identity as shown below:
Please note that this operation is irreversible. The only way to restore a meta-matrix is to save() the rendering context state, then to use userToMeta(), and then restored by restore() when needed.
Returns rendering context hints.
Sets the given rendering hint hintType
to value
.
Sets all rendering hints of this context to hints
.
Returns the rendering quality hint.
Sets rendering quality hint to value
.
Returns the gradient quality hint.
Sets gradient quality hint to value
.
Returns the pattern quality hint.
Sets pattern quality hint to value
.
Returns approximation options.
Sets approximation options to options
.
Returns flatten mode (how curves are flattened).
Sets flatten mode
(how curves are flattened).
Returns tolerance used for curve flattening.
Sets tolerance used for curve flattening.
Sets the composition operator to compOp
, see BLCompOp.
The composition operator is part of the rendering context state and is subject to save() and restore(). The default composition operator is BL_COMP_OP_SRC_OVER, which would be returned immediately after the rendering context is created.
Returns a global alpha value.
Returns the current style type associated with the given style slot
.
Reads a style state associated with the given style slot
and writes it into styleOut
.
Reads a style state associated with the given style slot
and writes it into styleOut
.
The retrieved style uses a transformation matrix that is a combination of style transformation matrix and the rendering context matrix at a time setStyle() was called).
Sets style
to be used with the given style slot
operation and applied transformMode
.
This is a convenience function that allows to control how the given style
is transformed. By default, if transformMode
is not provided, the rendering context combines the style transformation matrix with user transformation matrix, which is compatible with how it transforms geometry. However, if that' undesired, a transformMode
can override the default operation.
style
argument could be BLGradient, BLPattern, and BLVar. Sets the given style slot
to NULL, which disables it.
Styles set to NULL would reject all rendering operations that would otherwise use that style.
Returns fill or alpha value associated with the given style slot
.
The function behaves like fillAlpha()
or strokeAlpha()
depending on style slot
, see BLContextStyleSlot.
Set fill or stroke alpha
value associated with the given style slot
.
The function behaves like setFillAlpha()
or setStrokeAlpha()
depending on style slot
, see BLContextStyleSlot.
Swaps fill and stroke styles, see BLContextStyleSwapMode for options.
Returns the current fill style type.
Reads a fill style state and writes it into styleOut
variant.
Reads a fill style state and writes it into styleOut
variant.
Sets fill style to style
.
style
argument could be BLGradient, BLPattern, and BLVar. Returns fill alpha value.
Returns fill-rule, see BLFillRule.
Sets fill-rule, see BLFillRule.
Returns the current stroke style type.
Reads a stroke style state and writes it into styleOut
variant.
Reads a stroke style state and writes it into styleOut
variant.
Sets fill style to style
.
style
argument could be BLGradient, BLPattern, and BLVar. Returns stroke width.
Returns stroke miter-limit.
Returns stroke join, see BLStrokeJoin.
Returns stroke start-cap, see BLStrokeCap.
Returns stroke end-cap, see BLStrokeCap.
Returns stroke transform order, see BLStrokeTransformOrder.
Returns stroke dash-offset.
Returns stroke options as a reference to BLStrokeOptions.
Sets miter limit to miterLimit
.
Sets stroke join to strokeJoin
, see BLStrokeJoin.
Sets stroke cap of the specified type
to strokeCap
, see BLStrokeCap.
Sets stroke start cap to strokeCap
, see BLStrokeCap.
Sets stroke end cap to strokeCap
, see BLStrokeCap.
Sets all stroke caps to strokeCap
, see BLStrokeCap.
Sets stroke transformation order to transformOrder
, see BLStrokeTransformOrder.
Sets stroke dash-offset to dashOffset
.
Sets all stroke options
.
Returns stroke alpha value.
Restores clipping to the last saved state or to the context default clipping if there is no saved state.
If there are no saved states then it resets clipping completely to the initial state that was used when the rendering context was created.
Clear everything to a transparent black, which is the same operation as temporarily setting the composition operator to BL_COMP_OP_CLEAR and then filling everything by fillAll()
.
X
component would be set to 1.0
, which would translate to 0xFF
in case of BL_FORMAT_XRGB32. Clears a rectangle rect
(integer coordinates) to a transparent black, which is the same operation as temporarily setting the composition operator to BL_COMP_OP_CLEAR and then calling fillRect(rect)
.
X
component would be set to 1.0
, which would translate to 0xFF
in case of BL_FORMAT_XRGB32. Clears a rectangle rect
(floating-point coordinates) to a transparent black, which is the same operation as temporarily setting the composition operator to BL_COMP_OP_CLEAR and then calling fillRect(rect)
.
X
component would be set to 1.0
, which would translate to 0xFF
in case of BL_FORMAT_XRGB32. Clears a rectangle [x, y, w, h]
(floating-point coordinates) to a transparent black, which is the same operation as temporarily setting the composition operator to BL_COMP_OP_CLEAR and then calling fillRect(x, y, w, h)
.
X
component would be set to 1.0
, which would translate to 0xFF
in case of BL_FORMAT_XRGB32. Fills everything non-clipped with the current fill style.
Fills everything non-clipped with an explicit fill style
.
Fills a box
(floating point coordinates) with the current fill style.
[x0, y0, x1, y1]
, if you need [x, y, w, h]
, use fillRect() instead. Fills a box
(floating point coordinates) with an explicit fill style
.
[x0, y0, x1, y1]
, if you need [x, y, w, h]
, use fillRect() instead. Fills a box
(integer coordinates) with the current fill style.
[x0, y0, x1, y1]
, if you need [x, y, w, h]
, use fillRect() instead. Fills a box
(integer coordinates) with an explicit fill style
.
[x0, y0, x1, y1]
, if you need [x, y, w, h]
, use fillRect() instead. Fills a box [x0, y0, x1, y1]
(floating point coordinates) with the current fill style.
[x0, y0, x1, y1]
, if you need [x, y, w, h]
, use fillRect() instead. Fills a box [x0, y0, x1, y1]
(floating point coordinates) with an explicit fill style
.
[x0, y0, x1, y1]
, if you need [x, y, w, h]
, use fillRect() instead. Fills a rectangle rect
(integer coordinates) with the current fill style.
Fills a rectangle rect
(integer coordinates) with an explicit fill style
.
Fills a rectangle rect
(floating point coordinates) with the current fill style.
Fills a rectangle rect
(floating point coordinates) with an explicit fill style
.
Fills a rectangle [x, y, w, h]
(floating point coordinates) with the current fill style.
Fills a rectangle [x, y, w, h]
(floating point coordinates) with an explicit fill style
.
Fills a circle
(floating point coordinates) with the current fill style.
Fills a circle
(floating point coordinates) with an explicit fill style
.
Fills a circle at [cx, cy]
and radius r
(floating point coordinates) with the current fill style.
Fills a circle at [cx, cy]
and radius r
(floating point coordinates) with an explicit fill style
.
Fills an ellipse
(floating point coordinates) with the current fill style.
Fills an ellipse
(floating point coordinates) with an explicit fill style
.
Fills an ellipse at [cx, cy]
with radius [rx, ry]
(floating point coordinates) with the current fill style.
Fills an ellipse at [cx, cy]
with radius [rx, ry]
(floating point coordinates) with en explicit fill style
.
Fills a rounded rectangle rr
(floating point coordinates) with the current fill style.
Fills a rounded rectangle rr
(floating point coordinates) with en explicit fill style
.
Fills a rounded rectangle bounded by rect
with radius r
with the current fill style.
Fills a rounded rectangle bounded by rect
with radius [rx, ry]
with the current fill style.
Fills a rounded rectangle bounded by rect
with radius [rx, ry]
with en explicit fill style
.
Fills a rounded rectangle bounded by [x, y, w, h]
with radius r
with the current fill style.
Fills a rounded rectangle bounded as [x, y, w, h]
with radius [rx, ry]
with the current fill style.
Fills a rounded rectangle bounded as [x, y, w, h]
with radius [rx, ry]
with an explicit fill style
.
Fills a chord
(floating point coordinates) with the current fill style.
Fills a chord
(floating point coordinates) with an explicit fill style
.
Fills a chord at [cx, cy]
with radius r
at start
of sweep
(floating point coordinates) with the current fill style.
Fills a chord at [cx, cy]
with radius [rx, ry]
at start
of sweep
(floating point coordinates) with the current fill style.
Fills a chord at [cx, cy]
with radius [rx, ry]
at start
of sweep
(floating point coordinates) with an explicit fill style
.
Fills a pie
(floating point coordinates) with the current fill style.
Fills a pie
(floating point coordinates) with an explicit fill style
.
Fills a pie at [cx, cy]
with radius r
at start
of sweep
(floating point coordinates) with the current fill style.
Fills a pie at [cx, cy]
with radius [rx, ry]
at start
of sweep
(floating point coordinates) with the current fill style.
Fills a pie at [cx, cy]
with radius [rx, ry]
at start
of sweep
(floating point coordinates) with an explicit fill style
.
Fills a triangle
(floating point coordinates) with the current fill style.
Fills a triangle
(floating point coordinates) with an explicit fill style
.
Fills a triangle defined by [x0, y0]
, [x1, y1]
, [x2, y2]
(floating point coordinates) with the current fill style.
Fills a triangle defined by [x0, y0]
, [x1, y1]
, [x2, y2]
(floating point coordinates) with an explicit fill style
.
Fills a polygon poly
(floating point coordinates) with the current fill style.
Fills a polygon poly
(floating point coordinates) with an explicit fill style
.
Fills a polygon poly
having n
vertices (floating point coordinates) with the current fill style.
Fills a polygon poly
having n
vertices (floating point coordinates) with an explicit fill style
.
Fills a polygon poly
(integer coordinates) with the current fill style.
Fills a polygon poly
(integer coordinates) with an explicit fill style
.
Fills a polygon poly
having n
vertices (integer coordinates) with the current fill style.
Fills a polygon poly
having n
vertices (integer coordinates) with an explicit fill style
.
Fills an array
of boxes (floating point coordinates) with the default fill style.
Fills an array
of boxes (floating point coordinates) with an explicit fill style
.
Fills an array
of boxes of size n
(floating point coordinates) with the default fill style.
Fills an array
of boxes of size n
(floating point coordinates) with an explicit fill style
.
Fills an array
of boxes (integer coordinates) with the default fill style.
Fills an array
of boxes (integer coordinates) with an explicit fill style
.
Fills an array
of boxes of size n
(integer coordinates) with the default fill style.
Fills an array of boxes of size n
(integer coordinates) with an explicit fill style
.
Fills an array
of rectangles (floating point coordinates) with the default fill style.
Fills an array
of rectangles (floating point coordinates) with an explicit fill style
.
Fills an array
of rectangles of size n
(floating point coordinates) with the default fill style.
Fills an array
of rectangles of size n
(floating point coordinates) with an explicit fill style
.
Fills an array of rectangles (integer coordinates) with the default fill style.
Fills an array of rectangles (integer coordinates) with an explicit fill style
.
Fills an array
of rectangles of size n
(integer coordinates) with the default fill style.
Fills an array
of rectangles of size n
(integer coordinates) with an explicit fill style
.
Fills the given path
with the default fill style.
Fills the given path
with an explicit fill style
.
Fills the given path
translated by origin
with the default fill style.
Fills the given path
translated by origin
with an explicit fill style
.
Fills the passed geometry specified by geometry type
and data
with the default fill style.
type
and data
parameters are passed to a wrapper function that just passes them to the rendering context. It's a good way of creating wrappers, but generally low-level for a general purpose use, so please use this with caution. Fills the passed geometry specified by geometry type
and data
with an explicit fill style
.
type
and data
parameters are passed to a wrapper function that just passes them to the rendering context. It's a good way of creating wrappers, but generally low-level for a general purpose use, so please use this with caution. Fills UTF-8 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with the default fill style.
size
parameter defaults to SIZE_MAX
, which informs Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, use either this function with a size
parameter set (which contains the number of bytes of text
string, and not the number of UTF-8 characters) or an overloaded function that accepts a convenience BLStringView parameter instead of text
and size`. Fills UTF-8 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with an explicit fill style
.
SIZE_MAX
to size
to inform Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, use either this function with a size
parameter set (which contains the number of bytes of text
string, and not the number of UTF-8 characters) or an overloaded function that accepts a convenience BLStringView parameter instead of text
and size`. Fills UTF-8 encoded string passed as string view
by using the given font
at origin
(floating point coordinates) with the default fill style.
Fills UTF-8 encoded string passed as string view
by using the given font
at origin
(floating point coordinates) with an explicit fill style
.
Fills UTF-8 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with the default fill style.
size
parameter defaults to SIZE_MAX
, which informs Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, use either this function with a size
parameter set (which contains the number of bytes of text
string, and not the number of UTF-8 characters) or an overloaded function that accepts a convenience BLStringView parameter instead of text
and size`. Fills UTF-8 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with an explicit fill style
.
SIZE_MAX
in size
to inform Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, use either this function with a size
parameter set (which contains the number of bytes of text
string, and not the number of UTF-8 characters) or an overloaded function that accepts a convenience BLStringView parameter instead of text
and size`. Fills UTF-8 encoded string passed as string view
by using the given font
at origin
(floating point coordinates).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Fills UTF-16 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with the default fill style.
size
parameter defaults to SIZE_MAX
, which informs Blend2D that the input is a null terminated UTF-16 string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 16-bit values). Fills UTF-16 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with an explicit fill style
.
SIZE_MAX
in size
to inform Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 16-bit values). Fills UTF-16 encoded string passed as text
and size
by using the given font
at origin
(floating point coordinates) with the default fill style.
size
parameter defaults to SIZE_MAX
, which informs Blend2D that the input is a null terminated UTF-16 string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 16-bit values). Fills UTF-16 encoded string passed as text
and size
by using the given font
at origin
(floating point coordinates) with an explicit fill style
.
SIZE_MAX
in size
to inform Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 16-bit values). Fills UTF-32 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with the default fill style.
size
parameter defaults to SIZE_MAX
, which informs Blend2D that the input is a null terminated UTF-32 string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 32-bit values). Fills UTF-32 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with an explicit fill style
.
SIZE_MAX
in size
to inform Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 32-bit values). Fills UTF-32 encoded string passed as text
and size
by using the given font
at origin
(floating point coordinates) with the default fill style.
size
parameter defaults to SIZE_MAX
, which informs Blend2D that the input is a null terminated UTF-32 string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 32-bit values). Fills UTF-32 encoded string passed as text
and size
by using the given font
at origin
(floating point coordinates) with an explicit fill style
.
SIZE_MAX
in size
to inform Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 32-bit values). Fills a glyphRun
by using the given font
at origin
(integer coordinates) with the current fill style.
Fills a glyphRun
by using the given font
at origin
(integer coordinates) with an explicit fill style
.
Fills the passed glyphRun
by using the given font
at origin
(floating point coordinates) with the current fill style.
Fills the passed glyphRun
by using the given font
at origin
(floating point coordinates) with an explicit fill style
.
Fills a source mask
image at coordinates specified by origin
(int coordinates) with the current fill style.
Fills a source mask
image at coordinates specified by origin
(int coordinates) with an explicit fill style
.
Fills a source mask
image specified by maskArea
at coordinates specified by origin
(int coordinates) with the current fill style.
Fills a source mask
image specified by maskArea
at coordinates specified by origin
(int coordinates) with an explicit fill style
.
Fills a source mask
image at coordinates specified by origin
(floating point coordinates) with the current fill style.
Fills a source mask
image at coordinates specified by origin
(floating point coordinates) with an explicit fill style
.
Fills a source mask
image specified by maskArea
at coordinates specified by origin
(floating point coordinates) with the current fill style.
Fills a source mask
image specified by maskArea
at coordinates specified by origin
(floating point coordinates) with an explicit fill style.
Strokes a box
(floating point coordinates) with the current stroke style.
[x0, y0, x1, y1]
, if you need [x, y, w, h]
, use strokeRect() instead. Strokes a box
(floating point coordinates) with an explicit stroke style
.
[x0, y0, x1, y1]
, if you need [x, y, w, h]
, use strokeRect() instead. Strokes a box
(integer coordinates) with the current stroke style.
[x0, y0, x1, y1]
, if you need [x, y, w, h]
, use strokeRect() instead. Strokes a box
(integer coordinates) with an explicit stroke style
.
[x0, y0, x1, y1]
, if you need [x, y, w, h]
, use strokeRect() instead. Strokes a box [x0, y0, x1, y1]
(floating point coordinates) with the current stroke style.
[x0, y0, x1, y1]
, if you need [x, y, w, h]
, use strokeRect() instead. Strokes a box [x0, y0, x1, y1]
(floating point coordinates) with an explicit stroke style
.
[x0, y0, x1, y1]
, if you need [x, y, w, h]
, use strokeRect() instead. Strokes a rectangle rect
(integer coordinates) with the current stroke style.
Strokes a rectangle rect
(integer coordinates) with an explicit stroke style
.
Strokes a rectangle rect
(floating point coordinates) with the current stroke style.
Strokes a rectangle rect
(floating point coordinates) with an explicit stroke style
.
Strokes a rectangle [x, y, w, h]
(floating point coordinates) with the current stroke style.
Strokes a rectangle [x, y, w, h]
(floating point coordinates) with an explicit stroke style
.
Strokes a line specified as line
(floating point coordinates) with the default stroke style.
Strokes a line specified as line
(floating point coordinates) with an explicit stroke style
.
Strokes a line starting at p0
and ending at p1
(floating point coordinates) with the default stroke style.
Strokes a line starting at p0
and ending at p1
(floating point coordinates) with an explicit stroke style
.
Strokes a line starting at [x0, y0]
and ending at [x1, y1]
(floating point coordinates) with the default stroke style.
Strokes a line starting at [x0, y0]
and ending at [x1, y1]
(floating point coordinates) with an explicit stroke style
.
Strokes a circle
(floating point coordinates) with the current stroke style.
Strokes a circle
(floating point coordinates) with an explicit stroke style
.
Strokes a circle at [cx, cy]
and radius r
(floating point coordinates) with the current stroke style.
Strokes a circle at [cx, cy]
and radius r
(floating point coordinates) with an explicit stroke style
.
Strokes an ellipse
(floating point coordinates) with the current stroke style.
Strokes an ellipse
(floating point coordinates) with an explicit stroke style
.
Strokes an ellipse at [cx, cy]
with radius [rx, ry]
(floating point coordinates) with the current stroke style.
Strokes an ellipse at [cx, cy]
with radius [rx, ry]
(floating point coordinates) with en explicit stroke style
.
Strokes a rounded rectangle rr
(floating point coordinates) with the current stroke style.
Strokes a rounded rectangle rr
(floating point coordinates) with en explicit stroke style
.
Strokes a rounded rectangle bounded by rect
with radius r
with the current stroke style.
Strokes a rounded rectangle bounded by rect
with radius [rx, ry]
with the current stroke style.
Strokes a rounded rectangle bounded by rect
with radius [rx, ry]
with en explicit stroke style
.
Strokes a rounded rectangle bounded by [x, y, w, h]
with radius r
with the current stroke style.
Strokes a rounded rectangle bounded as [x, y, w, h]
with radius [rx, ry]
with the current stroke style.
Strokes a rounded rectangle bounded as [x, y, w, h]
with radius [rx, ry]
with an explicit stroke style
.
Strokes a chord
(floating point coordinates) with the current stroke style.
Strokes a chord
(floating point coordinates) with an explicit stroke style
.
Strokes a chord at [cx, cy]
with radius r
at start
of sweep
(floating point coordinates) with the current stroke style.
Strokes a chord at [cx, cy]
with radius [rx, ry]
at start
of sweep
(floating point coordinates) with the current stroke style.
Strokes a chord at [cx, cy]
with radius [rx, ry]
at start
of sweep
(floating point coordinates) with an explicit stroke style
.
Strokes a pie
(floating point coordinates) with the current stroke style.
Strokes a pie
(floating point coordinates) with an explicit stroke style
.
Strokes a pie at [cx, cy]
with radius r
at start
of sweep
(floating point coordinates) with the current stroke style.
Strokes a pie at [cx, cy]
with radius [rx, ry]
at start
of sweep
(floating point coordinates) with the current stroke style.
Strokes a pie at [cx, cy]
with radius [rx, ry]
at start
of sweep
(floating point coordinates) with an explicit stroke style
.
Strokes a triangle
(floating point coordinates) with the current stroke style.
Strokes a triangle
(floating point coordinates) with an explicit stroke style
.
Strokes a triangle defined by [x0, y0]
, [x1, y1]
, [x2, y2]
(floating point coordinates) with the current stroke style.
Strokes a triangle defined by [x0, y0]
, [x1, y1]
, [x2, y2]
(floating point coordinates) with an explicit stroke style
.
Strokes a polyline poly
(floating point coordinates) with the current stroke style.
Strokes a polyline poly
(floating point coordinates) with an explicit stroke style
.
Strokes a polyline poly
having n
vertices (floating point coordinates) with the current stroke style.
Strokes a polyline poly
having n
vertices (floating point coordinates) with an explicit stroke style
.
Strokes a polyline poly
(integer coordinates) with the current stroke style.
Strokes a polyline poly
(integer coordinates) with an explicit stroke style
.
Strokes a polyline poly
having n
vertices (integer coordinates) with the current stroke style.
Strokes a polyline poly
having n
vertices (integer coordinates) with an explicit stroke style
.
Strokes a polygon poly
(floating point coordinates) with the current stroke style.
Strokes a polygon poly
(floating point coordinates) with an explicit stroke style
.
Strokes a polygon poly
having n
vertices (floating point coordinates) with the current stroke style.
Strokes a polygon poly
having n
vertices (floating point coordinates) with an explicit stroke style
.
Strokes a polygon poly
(integer coordinates) with the current stroke style.
Strokes a polygon poly
(integer coordinates) with an explicit stroke style
.
Strokes a polygon poly
having n
vertices (integer coordinates) with the current stroke style.
Strokes a polygon poly
having n
vertices (integer coordinates) with an explicit stroke style
.
Strokes an array
of boxes (floating point coordinates) with the default stroke style.
Strokes an array
of boxes (floating point coordinates) with an explicit stroke style
.
Strokes an array
of boxes of size n
(floating point coordinates) with the default stroke style.
Strokes an array
of boxes of size n
(floating point coordinates) with an explicit stroke style
.
Strokes an array
of boxes (integer coordinates) with the default stroke style.
Strokes an array
of boxes (integer coordinates) with an explicit stroke style
.
Strokes an array
of boxes of size n
(integer coordinates) with the default stroke style.
Strokes an array of boxes of size n
(integer coordinates) with an explicit stroke style
.
Strokes an array
of rectangles (floating point coordinates) with the default stroke style.
Strokes an array
of rectangles (floating point coordinates) with an explicit stroke style
.
Strokes an array
of rectangles of size n
(floating point coordinates) with the default stroke style.
Strokes an array
of rectangles of size n
(floating point coordinates) with an explicit stroke style
.
Strokes an array of rectangles (integer coordinates) with the default stroke style.
Strokes an array of rectangles (integer coordinates) with an explicit stroke style
.
Strokes an array
of rectangles of size n
(integer coordinates) with the default stroke style.
Strokes an array
of rectangles of size n
(integer coordinates) with an explicit stroke style
.
Strokes the given path
with the default stroke style.
Strokes the given path
with an explicit stroke style
.
Strokes the given path
translated by origin
with the default stroke style.
Strokes the given path
translated by origin
with an explicit stroke style
.
Strokes the passed geometry specified by geometry type
and data
with the default stroke style.
type
and data
parameters are passed to a wrapper function that just passes them to the rendering context. It's a good way of creating wrappers, but generally low-level for a general purpose use, so please use this with caution. Strokes the passed geometry specified by geometry type
and data
with an explicit stroke style
.
type
and data
parameters are passed to a wrapper function that just passes them to the rendering context. It's a good way of creating wrappers, but generally low-level for a general purpose use, so please use this with caution. Strokes UTF-8 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with the default stroke style.
size
parameter defaults to SIZE_MAX
, which informs Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, use either this function with a size
parameter set (which contains the number of bytes of text
string, and not the number of UTF-8 characters) or an overloaded function that accepts a convenience BLStringView parameter instead of text
and size`. Strokes UTF-8 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with an explicit stroke style
.
SIZE_MAX
to size
to inform Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, use either this function with a size
parameter set (which contains the number of bytes of text
string, and not the number of UTF-8 characters) or an overloaded function that accepts a convenience BLStringView parameter instead of text
and size`. Strokes UTF-8 encoded string passed as string view
by using the given font
at origin
(floating point coordinates) with the default stroke style.
Strokes UTF-8 encoded string passed as string view
by using the given font
at origin
(floating point coordinates) with an explicit stroke style
.
Strokes UTF-8 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with the default stroke style.
size
parameter defaults to SIZE_MAX
, which informs Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, use either this function with a size
parameter set (which contains the number of bytes of text
string, and not the number of UTF-8 characters) or an overloaded function that accepts a convenience BLStringView parameter instead of text
and size`. Strokes UTF-8 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with an explicit stroke style
.
SIZE_MAX
in size
to inform Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, use either this function with a size
parameter set (which contains the number of bytes of text
string, and not the number of UTF-8 characters) or an overloaded function that accepts a convenience BLStringView parameter instead of text
and size`. Strokes UTF-8 encoded string passed as string view
by using the given font
at origin
(floating point coordinates).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Strokes UTF-16 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with the default stroke style.
size
parameter defaults to SIZE_MAX
, which informs Blend2D that the input is a null terminated UTF-16 string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 16-bit values). Strokes UTF-16 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with an explicit stroke style
.
SIZE_MAX
in size
to inform Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 16-bit values). Strokes UTF-16 encoded string passed as text
and size
by using the given font
at origin
(floating point coordinates) with the default stroke style.
size
parameter defaults to SIZE_MAX
, which informs Blend2D that the input is a null terminated UTF-16 string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 16-bit values). Strokes UTF-16 encoded string passed as text
and size
by using the given font
at origin
(floating point coordinates) with an explicit stroke style
.
SIZE_MAX
in size
to inform Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 16-bit values). Strokes UTF-32 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with the default stroke style.
size
parameter defaults to SIZE_MAX
, which informs Blend2D that the input is a null terminated UTF-32 string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 32-bit values). Strokes UTF-32 encoded string passed as text
and size
by using the given font
at origin
(integer coordinates) with an explicit stroke style
.
SIZE_MAX
in size
to inform Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 32-bit values). Strokes UTF-32 encoded string passed as text
and size
by using the given font
at origin
(floating point coordinates) with the default stroke style.
size
parameter defaults to SIZE_MAX
, which informs Blend2D that the input is a null terminated UTF-32 string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 32-bit values). Strokes UTF-32 encoded string passed as text
and size
by using the given font
at origin
(floating point coordinates) with an explicit stroke style
.
SIZE_MAX
in size
to inform Blend2D that the input is a null terminated string. If you want to pass a non-null terminated string or a substring of an existing string, specify size
parameter to the size of the text
buffer in code units (the number of 32-bit values). Strokes a glyphRun
by using the given font
at origin
(integer coordinates) with the current stroke style.
Strokes a glyphRun
by using the given font
at origin
(integer coordinates) with an explicit stroke style
.
Strokes the passed glyphRun
by using the given font
at origin
(floating point coordinates) with the current stroke style.
Strokes the passed glyphRun
by using the given font
at origin
(floating point coordinates) with an explicit stroke style
.
Blits source image src
at coordinates specified by origin
(int coordinates).
Blits an area in source image src
specified by srcArea
at coordinates specified by origin
(int coordinates).
Blits source image src
at coordinates specified by origin
(floating point coordinates).
Blits an area of source image src
specified by srcArea
at coordinates specified by origin
(floating point coordinates).
Blits a source image src
scaled to fit into rect
rectangle (int coordinates).
Blits an area of source image src
specified by srcArea
scaled to fit into rect
rectangle (int coordinates).
Blits a source image src
scaled to fit into rect
rectangle (floating point coordinates).
Blits an area of source image src
specified by srcArea
scaled to fit into rect
rectangle (floating point coordinates).