IndexRenderingBLContext
BLContext Class Reference

Rendering context [C++ API].

Member Functions

Construction & Destruction
Overloaded Operators
Target Information
Context Lifetime and Others
Properties
State Management
Transformations
Rendering Hints
Approximation Options
Composition Options
Style Options
Fill Style & Options
Stroke Style & Options
Clip Operations
Clear Geometry Operations
Fill Geometry Operations
Fill Text & Glyphs Operations
Fill Mask Operations
Stroke Geometry Operations
Stroke Text & Glyphs Operations
Image Blit Operations
- Public Member Functions inherited from BLContextCore

Additional Inherited Members

- Public Attributes inherited from BLObjectCore

BLContext::BLContext()noexcept[1/6][¶]

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.

BLContext::BLContext(
BLContext&& other
)noexcept[2/6][¶]

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.

BLContext::BLContext(
const BLContext& other
)noexcept[3/6][¶]

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.

BLContext::BLContext(
BLImageCore& target
)explicitnoexcept[4/6][¶]

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.

Note
Since Blend2D doesn't use exceptions in C++ this function always succeeds even when an error happened. The underlying C-API function blContextInitAs() returns an error, but it just cannot be propagated back. Use begin() function, which returns a BLResult to check the status of the call immediately.

BLContext::BLContext(
BLImageCore& target,
const BLContextCreateInfo& createInfo
)noexcept[5/6][¶]

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.

Note
Since Blend2D doesn't use exceptions in C++ this function always succeeds even when an error happened. The underlying C-API function blContextInitAs() returns an error, but it just cannot be propagated back. Use begin() function, which returns a BLResult to check the status of the call immediately.

BLContext::BLContext(
BLImageCore& target,
const BLContextCreateInfo* createInfo
)noexcept[6/6][¶]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

BLContext::~BLContext()noexcept[¶]

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.

Note
Destroying the rendering context would always internally call flush(BL_CONTEXT_FLUSH_SYNC), which would flush the render calls queue in case multi-threaded rendering is used.

BLContext::operator bool() constexplicitnoexcept[¶]

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.

BLContext ctx(some_image);
if (ctx) {
// Rendering context is initialized.
}

BLContext& BLContext::operator=(
const BLContext& other
)noexcept[1/2][¶]

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.

BLContext& BLContext::operator=(
BLContext&& other
)noexcept[2/2][¶]

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).

bool BLContext::operator==(
const BLContext& other
) constnoexcept[¶]

Returns whether this and other point to the same rendering context.

bool BLContext::operator!=(
const BLContext& other
) constnoexcept[¶]

Returns whether this and other are different rendering contexts.

BLSize BLContext::targetSize() constnoexcept[¶]

Returns the target size in abstract units (pixels in case of BLImage).

double BLContext::targetWidth() constnoexcept[¶]

Returns the target width in abstract units (pixels in case of BLImage).

double BLContext::targetHeight() constnoexcept[¶]

Returns the target height in abstract units (pixels in case of BLImage).

BLImage* BLContext::targetImage() constnoexcept[¶]

Returns the target image or null if there is no target image.

Note
The rendering context doesn't own the image, but it increases its writer count, which means that the image will not be destroyed even when user destroys it during the rendering (in such case it will be destroyed after the rendering ends when the writer count goes to zero). This means that the rendering context must hold the image and not the pointer to the BLImage passed to either the constructor or begin() function. So the returned pointer is not the same as the pointer passed to begin(), but it points to the same underlying data.

BLContextType BLContext::contextType() constnoexcept[¶]

Returns the type of this context, see BLContextType.

bool BLContext::isValid() constnoexcept[¶]

Tests whether the context is a valid rendering context that has attached target to it.

bool BLContext::equals(
const BLContext& other
) constnoexcept[¶]

Returns whether this and other point to the same rendering context.

BLResult BLContext::reset()noexcept[¶]

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.

BLResult BLContext::assign(
const BLContext& other
)noexcept[1/2][¶]

Assigns the other rendering context to this rendering context.

This is the same as using C++ copy-assignment operator, see operator=().

BLResult BLContext::assign(
BLContext&& other
)noexcept[2/2][¶]

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=().

BLResult BLContext::begin()noexcept[1/3][¶]

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.

BLResult BLContext::begin(
BLImageCore& image,
const BLContextCreateInfo& createInfo
)noexcept[2/3][¶]

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.

BLResult BLContext::begin(
BLImageCore& image,
const BLContextCreateInfo* createInfo
)noexcept[3/3][¶]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

BLResult BLContext::end()noexcept[¶]

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).

Note
Calling end() would implicitly call flush(BL_CONTEXT_FLUSH_SYNC), which would flush the render calls queue in case multi-threaded rendering is used.

BLResult BLContext::flush()noexcept[¶]

Flushes the context, see BLContextFlushFlags.

BLResult BLContext::getProperty(
const char* name,
BLVarCore& valueOut
) constnoexcept[1/2][¶]

Gets a property of the given name and assigns it to an initialized valueOut.

BLResult BLContext::getProperty(
BLVarCore& valueOut
) constnoexcept[2/2][¶]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

BLResult BLContext::setProperty(
const char* name,
const BLObjectCore& value
)noexcept[1/2][¶]

Sets a property of the given name to value.

BLResult BLContext::setProperty(
const BLObjectCore& value
)noexcept[2/2][¶]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

uint32_t BLContext::threadCount() constnoexcept[¶]

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.

BLContextErrorFlags BLContext::accumulatedErrorFlags() constnoexcept[¶]

Queries accumulated errors as flags, see BLContextErrorFlags.

Errors may accumulate during the lifetime of the rendering context.

uint32_t BLContext::savedStateCount() constnoexcept[¶]

Returns the number of saved states in the context (0 means no saved states).

Note
Each successful call to save() increments the saved-state counter and each successful call to 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.

BLResult BLContext::save()noexcept[1/2][¶]

Saves the current rendering context state.

Blend2D uses optimizations that make save() a cheap operation. Only core values are actually saved in save(), others will only be saved if they are modified. This means that consecutive calls to save() and restore() do almost nothing.

BLResult BLContext::save()noexcept[2/2][¶]

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.

BLResult BLContext::restore()noexcept[1/2][¶]

Restores the top-most saved context-state.

Possible return conditions:

BLResult BLContext::restore(
const BLContextCookie& cookie
)noexcept[2/2][¶]

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:

const BLMatrix2D& BLContext::metaTransform() constnoexcept[¶]

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().

const BLMatrix2D& BLContext::userTransform() constnoexcept[¶]

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.

const BLMatrix2D& BLContext::finalTransform() constnoexcept[¶]

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.

BLResult BLContext::setTransform(
const BLMatrix2D& transform
)noexcept[¶]

Sets user transformation matrix to m.

Note
This only assigns the user transformation matrix, which means that the meta transformation matrix is kept as is. This means that the final transformation matrix will be recalculated based on the given transform.

BLResult BLContext::resetTransform()noexcept[¶]

Resets user transformation matrix to identity.

Note
This only resets the user transformation matrix, which means that the meta transformation matrix is kept as is. This means that the final transformation matrix after resetTransform() would be the same as meta transformation matrix.

BLResult BLContext::translate(
double x,
double y
)noexcept[1/3][¶]

Translates the used transformation matrix by [x, y].

BLResult BLContext::translate(
const BLPointI& p
)noexcept[2/3][¶]

Translates the used transformation matrix by [p] (integer).

BLResult BLContext::translate(
const BLPoint& p
)noexcept[3/3][¶]

Translates the used transformation matrix by [p] (floating-point).

BLResult BLContext::scale(
double xy
)noexcept[1/4][¶]

Scales the user transformation matrix by xy (both X and Y is scaled by xy).

BLResult BLContext::scale(
double x,
double y
)noexcept[2/4][¶]

Scales the user transformation matrix by [x, y].

BLResult BLContext::scale(
const BLPointI& p
)noexcept[3/4][¶]

Scales the user transformation matrix by [p] (integer).

BLResult BLContext::scale(
const BLPoint& p
)noexcept[4/4][¶]

Scales the user transformation matrix by [p] (floating-point).

BLResult BLContext::skew(
double x,
double y
)noexcept[1/2][¶]

Skews the user transformation matrix by [x, y].

BLResult BLContext::skew(
const BLPoint& p
)noexcept[2/2][¶]

Skews the user transformation matrix by [p] (floating-point).

BLResult BLContext::rotate(
double angle
)noexcept[1/4][¶]

Rotates the user transformation matrix by angle.

BLResult BLContext::rotate(
double angle,
double x,
double y
)noexcept[2/4][¶]

Rotates the user transformation matrix at [x, y] by angle.

BLResult BLContext::rotate(
double angle,
const BLPoint& origin
)noexcept[3/4][¶]

Rotates the user transformation matrix at origin (integer) by angle.

BLResult BLContext::rotate(
double angle,
const BLPointI& origin
)noexcept[4/4][¶]

Rotates the user transformation matrix at origin (floating-point) by angle.

BLResult BLContext::applyTransform(
const BLMatrix2D& transform
)noexcept[¶]

Transforms the user transformation matrix by transform.

BLResult BLContext::postTranslate(
double x,
double y
)noexcept[1/3][¶]

Post-translates the used transformation matrix by [x, y].

Note
Post-translation uses a reversed order of matrix multiplication when compared to translate().

BLResult BLContext::postTranslate(
const BLPointI& p
)noexcept[2/3][¶]

Post-Translates the used transformation matrix by [p] (integer).

Note
Post-translation uses a reversed order of matrix multiplication when compared to translate().

BLResult BLContext::postTranslate(
const BLPoint& p
)noexcept[3/3][¶]

Post-translates the used transformation matrix by [p] (floating-point).

Note
Post-translation uses a reversed order of matrix multiplication when compared to translate().

BLResult BLContext::postScale(
double xy
)noexcept[1/4][¶]

Post-scales the user transformation matrix by xy (both X and Y is scaled by xy).

Note
Post-scale uses a reversed order of matrix multiplication when compared to scale().

BLResult BLContext::postScale(
double x,
double y
)noexcept[2/4][¶]

Post-scales the user transformation matrix by [x, y].

Note
Post-scale uses a reversed order of matrix multiplication when compared to scale().

BLResult BLContext::postScale(
const BLPointI& p
)noexcept[3/4][¶]

Post-scales the user transformation matrix by [p] (integer).

Note
Post-scale uses a reversed order of matrix multiplication when compared to scale().

BLResult BLContext::postScale(
const BLPoint& p
)noexcept[4/4][¶]

Post-scales the user transformation matrix by [p] (floating-point).

Note
Post-scale uses a reversed order of matrix multiplication when compared to scale().

BLResult BLContext::postSkew(
double x,
double y
)noexcept[1/2][¶]

Skews the user transformation matrix by [x, y].

Note
Post-skew uses a reversed order of matrix multiplication when compared to skew().

BLResult BLContext::postSkew(
const BLPoint& p
)noexcept[2/2][¶]

Skews the user transformation matrix by [p] (floating-point).

Note
Post-skew uses a reversed order of matrix multiplication when compared to skew().

BLResult BLContext::postRotate(
double angle
)noexcept[1/4][¶]

Rotates the user transformation matrix by angle.

Note
Post-rotation uses a reversed order of matrix multiplication when compared to rotate().

BLResult BLContext::postRotate(
double angle,
double x,
double y
)noexcept[2/4][¶]

Rotates the user transformation matrix at [x, y] by angle.

Note
Post-rotation uses a reversed order of matrix multiplication when compared to rotate().

BLResult BLContext::postRotate(
double angle,
const BLPoint& origin
)noexcept[3/4][¶]

Rotates the user transformation matrix at origin (integer) by angle.

Note
Post-rotation uses a reversed order of matrix multiplication when compared to rotate().

BLResult BLContext::postRotate(
double angle,
const BLPointI& origin
)noexcept[4/4][¶]

Rotates the user transformation matrix at origin (floating-point) by angle.

Note
Post-rotation uses a reversed order of matrix multiplication when compared to rotate().

BLResult BLContext::postTransform(
const BLMatrix2D& transform
)noexcept[¶]

Transforms the user transformation matrix by transform.

Note
Post-transform uses a reversed order of matrix multiplication when compared to applyTransform().

BLResult BLContext::userToMeta()noexcept[¶]

Stores the result of combining the current MetaTransform and UserTransform to MetaTransform and resets UserTransform to identity as shown below:

MetaTransform = MetaTransform x UserTransform
UserTransform = Identity

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.

const BLContextHints& BLContext::hints() constnoexcept[¶]

Returns rendering context hints.

BLResult BLContext::setHint(
BLContextHint hintType,
uint32_t value
)noexcept[¶]

Sets the given rendering hint hintType to value.

BLResult BLContext::setHints(
const BLContextHints& hints
)noexcept[¶]

Sets all rendering hints of this context to hints.

BLRenderingQuality BLContext::renderingQuality() constnoexcept[¶]

Returns the rendering quality hint.

Note
This is the same as calling hints() and extracting the rendering quality from it.

BLResult BLContext::setRenderingQuality()noexcept[¶]

Sets rendering quality hint to value.

BLGradientQuality BLContext::gradientQuality() constnoexcept[¶]

Returns the gradient quality hint.

Note
This is the same as calling hints() and extracting the gradient quality from it.

BLResult BLContext::setGradientQuality()noexcept[¶]

Sets gradient quality hint to value.

BLPatternQuality BLContext::patternQuality() constnoexcept[¶]

Returns the pattern quality hint.

Note
This is the same as calling hints() and extracting the pattern quality from it.

BLResult BLContext::setPatternQuality()noexcept[¶]

Sets pattern quality hint to value.

const BLApproximationOptions& BLContext::approximationOptions() constnoexcept[¶]

Returns approximation options.

BLResult BLContext::setApproximationOptions(
const BLApproximationOptions& options
)noexcept[¶]

Sets approximation options to options.

BLFlattenMode BLContext::flattenMode() constnoexcept[¶]

Returns flatten mode (how curves are flattened).

BLResult BLContext::setFlattenMode()noexcept[¶]

Sets flatten mode (how curves are flattened).

double BLContext::flattenTolerance() constnoexcept[¶]

Returns tolerance used for curve flattening.

BLResult BLContext::setFlattenTolerance(
double tolerance
)noexcept[¶]

Sets tolerance used for curve flattening.

BLCompOp BLContext::compOp() constnoexcept[¶]

Returns a composition operator.

BLResult BLContext::setCompOp(
BLCompOp compOp
)noexcept[¶]

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.

double BLContext::globalAlpha() constnoexcept[¶]

Returns a global alpha value.

BLResult BLContext::setGlobalAlpha(
double alpha
)noexcept[¶]

Sets the global alpha value.

The global alpha value is part of the rendering context state and is subject to save() and restore(). The default value is 1.0, which would be returned immediately after the rendering context is created.

BLObjectType BLContext::styleType() constnoexcept[¶]

Returns the current style type associated with the given style slot.

BLResult BLContext::getStyle(
BLVarCore& styleOut
) constnoexcept[¶]

Reads a style state associated with the given style slot and writes it into styleOut.

Note
This function returns the original style passed to the rendering context with its original transformation matrix if it's not a solid color. Consider using getTransformedStyle() if you want to get a style with the transformation matrix that the rendering context actually uses to render it.

BLResult BLContext::getTransformedStyle(
BLVarCore& styleOut
) constnoexcept[¶]

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).

template<typename StyleT>
BLResult BLContext::setStyle(
const StyleT& style
)noexcept[1/2][¶]

Sets style to be used with the given style slot operation.

Note
The style argument could be BLRgba, BLRgba32, BLRgba64, BLGradient, BLPattern, and BLVar.

template<typename StyleT>
BLResult BLContext::setStyle(
const StyleT& style,
)noexcept[2/2][¶]

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.

Note
The style argument could be BLGradient, BLPattern, and BLVar.

BLResult BLContext::disableStyle()noexcept[¶]

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.

double BLContext::styleAlpha() constnoexcept[¶]

Returns fill or alpha value associated with the given style slot.

The function behaves like fillAlpha() or strokeAlpha() depending on style slot, see BLContextStyleSlot.

BLResult BLContext::setStyleAlpha(
double alpha
)noexcept[¶]

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.

BLResult BLContext::swapStyles()noexcept[¶]

Swaps fill and stroke styles, see BLContextStyleSwapMode for options.

BLObjectType BLContext::fillStyleType() constnoexcept[¶]

Returns the current fill style type.

BLResult BLContext::getFillStyle() constnoexcept[¶]

Reads a fill style state and writes it into styleOut variant.

Note
This function returns the original style passed to the rendering context with its original transformation matrix if it's not a solid color. Consider using getTransformedFillStyle() if you want to get a fill style with the transformation matrix that the rendering context actually uses to render it.

BLResult BLContext::getTransformedFillStyle() constnoexcept[¶]

Reads a fill style state and writes it into styleOut variant.

template<typename StyleT>
BLResult BLContext::setFillStyle(
const StyleT& style
)noexcept[1/2][¶]

Sets fill style.

Note
The style argument could be BLRgba, BLRgba32, BLRgba64, BLGradient, BLPattern, and BLVar.

template<typename StyleT>
BLResult BLContext::setFillStyle(
const StyleT& style,
)noexcept[2/2][¶]

Sets fill style to style.

Note
The style argument could be BLGradient, BLPattern, and BLVar.

BLResult BLContext::disableFillStyle()noexcept[¶]

Sets fill style to NULL, which disables it.

double BLContext::fillAlpha() constnoexcept[¶]

Returns fill alpha value.

BLResult BLContext::setFillAlpha(
double alpha
)noexcept[¶]

Sets fill alpha value.

BLFillRule BLContext::fillRule() constnoexcept[¶]

Returns fill-rule, see BLFillRule.

BLResult BLContext::setFillRule(
BLFillRule fillRule
)noexcept[¶]

Sets fill-rule, see BLFillRule.

BLObjectType BLContext::strokeStyleType() constnoexcept[¶]

Returns the current stroke style type.

BLResult BLContext::getStrokeStyle() constnoexcept[¶]

Reads a stroke style state and writes it into styleOut variant.

Note
This function returns the original style passed to the rendering context with its original transformation matrix if it's not a solid color. Consider using getTransformedStrokeStyle() if you want to get a stroke style with the transformation matrix that the rendering context actually uses to render it.

BLResult BLContext::getTransformedStrokeStyle() constnoexcept[¶]

Reads a stroke style state and writes it into styleOut variant.

template<typename StyleT>
BLResult BLContext::setStrokeStyle(
const StyleT& style
)noexcept[1/2][¶]

Sets stroke style.

Note
The style argument could be BLRgba, BLRgba32, BLRgba64, BLGradient, BLPattern, and BLVar.

template<typename StyleT>
BLResult BLContext::setStrokeStyle(
const StyleT& style,
)noexcept[2/2][¶]

Sets fill style to style.

Note
The style argument could be BLGradient, BLPattern, and BLVar.

BLResult BLContext::disableStrokeStyle()noexcept[¶]

Sets stroke style to NULL, which disables it.

double BLContext::strokeWidth() constnoexcept[¶]

Returns stroke width.

double BLContext::strokeMiterLimit() constnoexcept[¶]

Returns stroke miter-limit.

BLStrokeJoin BLContext::strokeJoin() constnoexcept[¶]

Returns stroke join, see BLStrokeJoin.

BLStrokeCap BLContext::strokeStartCap() constnoexcept[¶]

Returns stroke start-cap, see BLStrokeCap.

BLStrokeCap BLContext::strokeEndCap() constnoexcept[¶]

Returns stroke end-cap, see BLStrokeCap.

BLStrokeTransformOrder BLContext::strokeTransformOrder() constnoexcept[¶]

Returns stroke transform order, see BLStrokeTransformOrder.

double BLContext::strokeDashOffset() constnoexcept[¶]

Returns stroke dash-offset.

const BLArray<double>& BLContext::strokeDashArray() constnoexcept[¶]

Returns stroke dash-array.

const BLStrokeOptions& BLContext::strokeOptions() constnoexcept[¶]

Returns stroke options as a reference to BLStrokeOptions.

BLResult BLContext::setStrokeWidth(
double width
)noexcept[¶]

Sets stroke width to width.

BLResult BLContext::setStrokeMiterLimit(
double miterLimit
)noexcept[¶]

Sets miter limit to miterLimit.

BLResult BLContext::setStrokeJoin(
BLStrokeJoin strokeJoin
)noexcept[¶]

Sets stroke join to strokeJoin, see BLStrokeJoin.

BLResult BLContext::setStrokeCap(
BLStrokeCap strokeCap
)noexcept[¶]

Sets stroke cap of the specified type to strokeCap, see BLStrokeCap.

BLResult BLContext::setStrokeStartCap(
BLStrokeCap strokeCap
)noexcept[¶]

Sets stroke start cap to strokeCap, see BLStrokeCap.

BLResult BLContext::setStrokeEndCap(
BLStrokeCap strokeCap
)noexcept[¶]

Sets stroke end cap to strokeCap, see BLStrokeCap.

BLResult BLContext::setStrokeCaps(
BLStrokeCap strokeCap
)noexcept[¶]

Sets all stroke caps to strokeCap, see BLStrokeCap.

BLResult BLContext::setStrokeTransformOrder(
BLStrokeTransformOrder transformOrder
)noexcept[¶]

Sets stroke transformation order to transformOrder, see BLStrokeTransformOrder.

BLResult BLContext::setStrokeDashOffset(
double dashOffset
)noexcept[¶]

Sets stroke dash-offset to dashOffset.

BLResult BLContext::setStrokeDashArray(
const BLArray<double>& dashArray
)noexcept[¶]

Sets stroke dash-array to dashArray.

BLResult BLContext::setStrokeOptions(
const BLStrokeOptions& options
)noexcept[¶]

Sets all stroke options.

double BLContext::strokeAlpha() constnoexcept[¶]

Returns stroke alpha value.

BLResult BLContext::setStrokeAlpha(
double alpha
)noexcept[¶]

Sets stroke alpha value to alpha.

BLResult BLContext::restoreClipping()noexcept[¶]

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.

BLResult BLContext::clearAll()noexcept[¶]

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().

Note
If the target surface doesn't have alpha, but has X component, like BL_FORMAT_XRGB32, the X component would be set to 1.0, which would translate to 0xFF in case of BL_FORMAT_XRGB32.

BLResult BLContext::clearRect(
const BLRectI& rect
)noexcept[1/3][¶]

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).

Note
If the target surface doesn't have alpha, but has X component, like BL_FORMAT_XRGB32, the X component would be set to 1.0, which would translate to 0xFF in case of BL_FORMAT_XRGB32.

BLResult BLContext::clearRect(
const BLRect& rect
)noexcept[2/3][¶]

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).

Note
If the target surface doesn't have alpha, but has X component, like BL_FORMAT_XRGB32, the X component would be set to 1.0, which would translate to 0xFF in case of BL_FORMAT_XRGB32.

BLResult BLContext::clearRect(
double x,
double y,
double w,
double h
)noexcept[3/3][¶]

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).

Note
If the target surface doesn't have alpha, but has X component, like BL_FORMAT_XRGB32, the X component would be set to 1.0, which would translate to 0xFF in case of BL_FORMAT_XRGB32.

BLResult BLContext::fillAll()noexcept[1/2][¶]

Fills everything non-clipped with the current fill style.

template<typename StyleT>
BLResult BLContext::fillAll(
const StyleT& style
)noexcept[2/2][¶]

Fills everything non-clipped with an explicit fill style.

BLResult BLContext::fillBox(
const BLBox& box
)noexcept[1/6][¶]

Fills a box (floating point coordinates) with the current fill style.

Note
Box is defined as [x0, y0, x1, y1], if you need [x, y, w, h], use fillRect() instead.

template<typename StyleT>
BLResult BLContext::fillBox(
const BLBox& box,
const StyleT& style
)noexcept[2/6][¶]

Fills a box (floating point coordinates) with an explicit fill style.

Note
Box is defined as [x0, y0, x1, y1], if you need [x, y, w, h], use fillRect() instead.

BLResult BLContext::fillBox(
const BLBoxI& box
)noexcept[3/6][¶]

Fills a box (integer coordinates) with the current fill style.

Note
Box is defined as [x0, y0, x1, y1], if you need [x, y, w, h], use fillRect() instead.

template<typename StyleT>
BLResult BLContext::fillBox(
const BLBoxI& box,
const StyleT& style
)noexcept[4/6][¶]

Fills a box (integer coordinates) with an explicit fill style.

Note
Box is defined as [x0, y0, x1, y1], if you need [x, y, w, h], use fillRect() instead.

BLResult BLContext::fillBox(
double x0,
double y0,
double x1,
double y1
)noexcept[5/6][¶]

Fills a box [x0, y0, x1, y1] (floating point coordinates) with the current fill style.

Note
Box is defined as [x0, y0, x1, y1], if you need [x, y, w, h], use fillRect() instead.

template<typename StyleT>
BLResult BLContext::fillBox(
double x0,
double y0,
double x1,
double y1,
const StyleT& style
)noexcept[6/6][¶]

Fills a box [x0, y0, x1, y1] (floating point coordinates) with an explicit fill style.

Note
Box is defined as [x0, y0, x1, y1], if you need [x, y, w, h], use fillRect() instead.

BLResult BLContext::fillRect(
const BLRectI& rect
)noexcept[1/6][¶]

Fills a rectangle rect (integer coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillRect(
const BLRectI& rect,
const StyleT& style
)noexcept[2/6][¶]

Fills a rectangle rect (integer coordinates) with an explicit fill style.

BLResult BLContext::fillRect(
const BLRect& rect
)noexcept[3/6][¶]

Fills a rectangle rect (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillRect(
const BLRect& rect,
const StyleT& style
)noexcept[4/6][¶]

Fills a rectangle rect (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillRect(
double x,
double y,
double w,
double h
)noexcept[5/6][¶]

Fills a rectangle [x, y, w, h] (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillRect(
double x,
double y,
double w,
double h,
const StyleT& style
)noexcept[6/6][¶]

Fills a rectangle [x, y, w, h] (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillCircle(
const BLCircle& circle
)noexcept[1/4][¶]

Fills a circle (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillCircle(
const BLCircle& circle,
const StyleT& style
)noexcept[2/4][¶]

Fills a circle (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillCircle(
double cx,
double cy,
double r
)noexcept[3/4][¶]

Fills a circle at [cx, cy] and radius r (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillCircle(
double cx,
double cy,
double r,
const StyleT& style
)noexcept[4/4][¶]

Fills a circle at [cx, cy] and radius r (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillEllipse(
const BLEllipse& ellipse
)noexcept[1/4][¶]

Fills an ellipse (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillEllipse(
const BLEllipse& ellipse,
const StyleT& style
)noexcept[2/4][¶]

Fills an ellipse (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillEllipse(
double cx,
double cy,
double rx,
double ry
)noexcept[3/4][¶]

Fills an ellipse at [cx, cy] with radius [rx, ry] (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillEllipse(
double cx,
double cy,
double rx,
double ry,
const StyleT& style
)noexcept[4/4][¶]

Fills an ellipse at [cx, cy] with radius [rx, ry] (floating point coordinates) with en explicit fill style.

BLResult BLContext::fillRoundRect(
const BLRoundRect& rr
)noexcept[1/8][¶]

Fills a rounded rectangle rr (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillRoundRect(
const BLRoundRect& rr,
const StyleT& style
)noexcept[2/8][¶]

Fills a rounded rectangle rr (floating point coordinates) with en explicit fill style.

BLResult BLContext::fillRoundRect(
const BLRect& rect,
double r
)noexcept[3/8][¶]

Fills a rounded rectangle bounded by rect with radius r with the current fill style.

BLResult BLContext::fillRoundRect(
const BLRect& rect,
double rx,
double ry
)noexcept[4/8][¶]

Fills a rounded rectangle bounded by rect with radius [rx, ry] with the current fill style.

template<typename StyleT>
BLResult BLContext::fillRoundRect(
const BLRect& rect,
double rx,
double ry,
const StyleT& style
)noexcept[5/8][¶]

Fills a rounded rectangle bounded by rect with radius [rx, ry] with en explicit fill style.

BLResult BLContext::fillRoundRect(
double x,
double y,
double w,
double h,
double r
)noexcept[6/8][¶]

Fills a rounded rectangle bounded by [x, y, w, h] with radius r with the current fill style.

BLResult BLContext::fillRoundRect(
double x,
double y,
double w,
double h,
double rx,
double ry
)noexcept[7/8][¶]

Fills a rounded rectangle bounded as [x, y, w, h] with radius [rx, ry] with the current fill style.

template<typename StyleT>
BLResult BLContext::fillRoundRect(
double x,
double y,
double w,
double h,
double rx,
double ry,
const StyleT& style
)noexcept[8/8][¶]

Fills a rounded rectangle bounded as [x, y, w, h] with radius [rx, ry] with an explicit fill style.

BLResult BLContext::fillChord(
const BLArc& chord
)noexcept[1/5][¶]

Fills a chord (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillChord(
const BLArc& chord,
const StyleT& style
)noexcept[2/5][¶]

Fills a chord (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillChord(
double cx,
double cy,
double r,
double start,
double sweep
)noexcept[3/5][¶]

Fills a chord at [cx, cy] with radius r at start of sweep (floating point coordinates) with the current fill style.

BLResult BLContext::fillChord(
double cx,
double cy,
double rx,
double ry,
double start,
double sweep
)noexcept[4/5][¶]

Fills a chord at [cx, cy] with radius [rx, ry] at start of sweep (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillChord(
double cx,
double cy,
double rx,
double ry,
double start,
double sweep,
const StyleT& style
)noexcept[5/5][¶]

Fills a chord at [cx, cy] with radius [rx, ry] at start of sweep (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillPie(
const BLArc& pie
)noexcept[1/5][¶]

Fills a pie (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillPie(
const BLArc& pie,
const StyleT& style
)noexcept[2/5][¶]

Fills a pie (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillPie(
double cx,
double cy,
double r,
double start,
double sweep
)noexcept[3/5][¶]

Fills a pie at [cx, cy] with radius r at start of sweep (floating point coordinates) with the current fill style.

BLResult BLContext::fillPie(
double cx,
double cy,
double rx,
double ry,
double start,
double sweep
)noexcept[4/5][¶]

Fills a pie at [cx, cy] with radius [rx, ry] at start of sweep (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillPie(
double cx,
double cy,
double rx,
double ry,
double start,
double sweep,
const StyleT& style
)noexcept[5/5][¶]

Fills a pie at [cx, cy] with radius [rx, ry] at start of sweep (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillTriangle(
const BLTriangle& triangle
)noexcept[1/4][¶]

Fills a triangle (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillTriangle(
const BLTriangle& triangle,
const StyleT& style
)noexcept[2/4][¶]

Fills a triangle (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillTriangle(
double x0,
double y0,
double x1,
double y1,
double x2,
double y2
)noexcept[3/4][¶]

Fills a triangle defined by [x0, y0], [x1, y1], [x2, y2] (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillTriangle(
double x0,
double y0,
double x1,
double y1,
double x2,
double y2,
const StyleT& style
)noexcept[4/4][¶]

Fills a triangle defined by [x0, y0], [x1, y1], [x2, y2] (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillPolygon(
const BLArrayView<BLPoint>& poly
)noexcept[1/8][¶]

Fills a polygon poly (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillPolygon(
const BLArrayView<BLPoint>& poly,
const StyleT& style
)noexcept[2/8][¶]

Fills a polygon poly (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillPolygon(
const BLPoint* poly,
size_t n
)noexcept[3/8][¶]

Fills a polygon poly having n vertices (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillPolygon(
const BLPoint* poly,
size_t n,
const StyleT& style
)noexcept[4/8][¶]

Fills a polygon poly having n vertices (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillPolygon(
const BLArrayView<BLPointI>& poly
)noexcept[5/8][¶]

Fills a polygon poly (integer coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillPolygon(
const BLArrayView<BLPointI>& poly,
const StyleT& style
)noexcept[6/8][¶]

Fills a polygon poly (integer coordinates) with an explicit fill style.

BLResult BLContext::fillPolygon(
const BLPointI* poly,
size_t n
)noexcept[7/8][¶]

Fills a polygon poly having n vertices (integer coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillPolygon(
const BLPointI* poly,
size_t n,
const StyleT& style
)noexcept[8/8][¶]

Fills a polygon poly having n vertices (integer coordinates) with an explicit fill style.

BLResult BLContext::fillBoxArray(
const BLArrayView<BLBox>& array
)noexcept[1/8][¶]

Fills an array of boxes (floating point coordinates) with the default fill style.

template<typename StyleT>
BLResult BLContext::fillBoxArray(
const BLArrayView<BLBox>& array,
const StyleT& style
)noexcept[2/8][¶]

Fills an array of boxes (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillBoxArray(
const BLBox* array,
size_t n
)noexcept[3/8][¶]

Fills an array of boxes of size n (floating point coordinates) with the default fill style.

template<typename StyleT>
BLResult BLContext::fillBoxArray(
const BLBox* array,
size_t n,
const StyleT& style
)noexcept[4/8][¶]

Fills an array of boxes of size n (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillBoxArray(
const BLArrayView<BLBoxI>& array
)noexcept[5/8][¶]

Fills an array of boxes (integer coordinates) with the default fill style.

template<typename StyleT>
BLResult BLContext::fillBoxArray(
const BLArrayView<BLBoxI>& array,
const StyleT& style
)noexcept[6/8][¶]

Fills an array of boxes (integer coordinates) with an explicit fill style.

BLResult BLContext::fillBoxArray(
const BLBoxI* array,
size_t n
)noexcept[7/8][¶]

Fills an array of boxes of size n (integer coordinates) with the default fill style.

template<typename StyleT>
BLResult BLContext::fillBoxArray(
const BLBoxI* array,
size_t n,
const StyleT& style
)noexcept[8/8][¶]

Fills an array of boxes of size n (integer coordinates) with an explicit fill style.

BLResult BLContext::fillRectArray(
const BLArrayView<BLRect>& array
)noexcept[1/8][¶]

Fills an array of rectangles (floating point coordinates) with the default fill style.

template<typename StyleT>
BLResult BLContext::fillRectArray(
const BLArrayView<BLRect>& array,
const StyleT& style
)noexcept[2/8][¶]

Fills an array of rectangles (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillRectArray(
const BLRect* array,
size_t n
)noexcept[3/8][¶]

Fills an array of rectangles of size n (floating point coordinates) with the default fill style.

template<typename StyleT>
BLResult BLContext::fillRectArray(
const BLRect* array,
size_t n,
const StyleT& style
)noexcept[4/8][¶]

Fills an array of rectangles of size n (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillRectArray(
const BLArrayView<BLRectI>& array
)noexcept[5/8][¶]

Fills an array of rectangles (integer coordinates) with the default fill style.

template<typename StyleT>
BLResult BLContext::fillRectArray(
const BLArrayView<BLRectI>& array,
const StyleT& style
)noexcept[6/8][¶]

Fills an array of rectangles (integer coordinates) with an explicit fill style.

BLResult BLContext::fillRectArray(
const BLRectI* array,
size_t n
)noexcept[7/8][¶]

Fills an array of rectangles of size n (integer coordinates) with the default fill style.

template<typename StyleT>
BLResult BLContext::fillRectArray(
const BLRectI* array,
size_t n,
const StyleT& style
)noexcept[8/8][¶]

Fills an array of rectangles of size n (integer coordinates) with an explicit fill style.

BLResult BLContext::fillPath(
const BLPathCore& path
)noexcept[1/4][¶]

Fills the given path with the default fill style.

template<typename StyleT>
BLResult BLContext::fillPath(
const BLPathCore& path,
const StyleT& style
)noexcept[2/4][¶]

Fills the given path with an explicit fill style.

BLResult BLContext::fillPath(
const BLPoint& origin,
const BLPathCore& path
)noexcept[3/4][¶]

Fills the given path translated by origin with the default fill style.

template<typename StyleT>
BLResult BLContext::fillPath(
const BLPoint& origin,
const BLPathCore& path,
const StyleT& style
)noexcept[4/4][¶]

Fills the given path translated by origin with an explicit fill style.

BLResult BLContext::fillGeometry(
const void* data
)noexcept[1/2][¶]

Fills the passed geometry specified by geometry type and data with the default fill style.

Note
This function provides a low-level interface that can be used in cases in which geometry 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.

template<typename StyleT>
BLResult BLContext::fillGeometry(
const void* data,
const StyleT& style
)noexcept[2/2][¶]

Fills the passed geometry specified by geometry type and data with an explicit fill style.

Note
This function provides a low-level interface that can be used in cases in which geometry 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.

BLResult BLContext::fillUtf8Text(
const BLPointI& origin,
const BLFontCore& font,
const char* text,
size_t size = SIZE_MAX
)noexcept[1/8][¶]

Fills UTF-8 encoded string passed as text and size by using the given font at origin (integer coordinates) with the default fill style.

Note
The 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`.

template<typename StyleT>
BLResult BLContext::fillUtf8Text(
const BLPointI& origin,
const BLFontCore& font,
const char* text,
size_t size,
const StyleT& style
)noexcept[2/8][¶]

Fills UTF-8 encoded string passed as text and size by using the given font at origin (integer coordinates) with an explicit fill style.

Note
Pass 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`.

BLResult BLContext::fillUtf8Text(
const BLPointI& origin,
const BLFontCore& font,
const BLStringView& view
)noexcept[3/8][¶]

Fills UTF-8 encoded string passed as string view by using the given font at origin (floating point coordinates) with the default fill style.

template<typename StyleT>
BLResult BLContext::fillUtf8Text(
const BLPointI& origin,
const BLFontCore& font,
const BLStringView& view,
const StyleT& style
)noexcept[4/8][¶]

Fills UTF-8 encoded string passed as string view by using the given font at origin (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillUtf8Text(
const BLPoint& origin,
const BLFontCore& font,
const char* text,
size_t size = SIZE_MAX
)noexcept[5/8][¶]

Fills UTF-8 encoded string passed as text and size by using the given font at origin (integer coordinates) with the default fill style.

Note
The 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`.

template<typename StyleT>
BLResult BLContext::fillUtf8Text(
const BLPoint& origin,
const BLFontCore& font,
const char* text,
size_t size,
const StyleT& style
)noexcept[6/8][¶]

Fills UTF-8 encoded string passed as text and size by using the given font at origin (integer coordinates) with an explicit fill style.

Note
Pass 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`.

BLResult BLContext::fillUtf8Text(
const BLPoint& origin,
const BLFontCore& font,
const BLStringView& view
)noexcept[7/8][¶]

Fills UTF-8 encoded string passed as string view by using the given font at origin (floating point coordinates).

template<typename StyleT>
BLResult BLContext::fillUtf8Text(
const BLPoint& origin,
const BLFontCore& font,
const BLStringView& view,
const StyleT& style
)noexcept[8/8][¶]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

BLResult BLContext::fillUtf16Text(
const BLPointI& origin,
const BLFontCore& font,
const uint16_t* text,
size_t size = SIZE_MAX
)noexcept[1/4][¶]

Fills UTF-16 encoded string passed as text and size by using the given font at origin (integer coordinates) with the default fill style.

Note
The 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).

template<typename StyleT>
BLResult BLContext::fillUtf16Text(
const BLPointI& origin,
const BLFontCore& font,
const uint16_t* text,
size_t size,
const StyleT& style
)noexcept[2/4][¶]

Fills UTF-16 encoded string passed as text and size by using the given font at origin (integer coordinates) with an explicit fill style.

Note
Pass 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).

BLResult BLContext::fillUtf16Text(
const BLPoint& origin,
const BLFontCore& font,
const uint16_t* text,
size_t size = SIZE_MAX
)noexcept[3/4][¶]

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.

Note
The 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).

template<typename StyleT>
BLResult BLContext::fillUtf16Text(
const BLPoint& origin,
const BLFontCore& font,
const uint16_t* text,
size_t size,
const StyleT& style
)noexcept[4/4][¶]

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.

Note
Pass 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).

BLResult BLContext::fillUtf32Text(
const BLPointI& origin,
const BLFontCore& font,
const uint32_t* text,
size_t size = SIZE_MAX
)noexcept[1/4][¶]

Fills UTF-32 encoded string passed as text and size by using the given font at origin (integer coordinates) with the default fill style.

Note
The 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).

template<typename StyleT>
BLResult BLContext::fillUtf32Text(
const BLPointI& origin,
const BLFontCore& font,
const uint32_t* text,
size_t size,
const StyleT& style
)noexcept[2/4][¶]

Fills UTF-32 encoded string passed as text and size by using the given font at origin (integer coordinates) with an explicit fill style.

Note
Pass 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).

BLResult BLContext::fillUtf32Text(
const BLPoint& origin,
const BLFontCore& font,
const uint32_t* text,
size_t size = SIZE_MAX
)noexcept[3/4][¶]

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.

Note
The 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).

template<typename StyleT>
BLResult BLContext::fillUtf32Text(
const BLPoint& origin,
const BLFontCore& font,
const uint32_t* text,
size_t size,
const StyleT& style
)noexcept[4/4][¶]

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.

Note
Pass 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).

BLResult BLContext::fillGlyphRun(
const BLPointI& origin,
const BLFontCore& font,
const BLGlyphRun& glyphRun
)noexcept[1/4][¶]

Fills a glyphRun by using the given font at origin (integer coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillGlyphRun(
const BLPointI& origin,
const BLFontCore& font,
const BLGlyphRun& glyphRun,
const StyleT& style
)noexcept[2/4][¶]

Fills a glyphRun by using the given font at origin (integer coordinates) with an explicit fill style.

BLResult BLContext::fillGlyphRun(
const BLPoint& origin,
const BLFontCore& font,
const BLGlyphRun& glyphRun
)noexcept[3/4][¶]

Fills the passed glyphRun by using the given font at origin (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillGlyphRun(
const BLPoint& origin,
const BLFontCore& font,
const BLGlyphRun& glyphRun,
const StyleT& style
)noexcept[4/4][¶]

Fills the passed glyphRun by using the given font at origin (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillMask(
const BLPointI& origin,
const BLImage& mask
)noexcept[1/8][¶]

Fills a source mask image at coordinates specified by origin (int coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillMask(
const BLPointI& origin,
const BLImage& mask,
const StyleT& style
)noexcept[2/8][¶]

Fills a source mask image at coordinates specified by origin (int coordinates) with an explicit fill style.

BLResult BLContext::fillMask(
const BLPointI& origin,
const BLImage& mask,
const BLRectI& maskArea
)noexcept[3/8][¶]

Fills a source mask image specified by maskArea at coordinates specified by origin (int coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillMask(
const BLPointI& origin,
const BLImage& mask,
const BLRectI& maskArea,
const StyleT& style
)noexcept[4/8][¶]

Fills a source mask image specified by maskArea at coordinates specified by origin (int coordinates) with an explicit fill style.

BLResult BLContext::fillMask(
const BLPoint& origin,
const BLImage& mask
)noexcept[5/8][¶]

Fills a source mask image at coordinates specified by origin (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillMask(
const BLPoint& origin,
const BLImage& mask,
const StyleT& style
)noexcept[6/8][¶]

Fills a source mask image at coordinates specified by origin (floating point coordinates) with an explicit fill style.

BLResult BLContext::fillMask(
const BLPoint& origin,
const BLImage& mask,
const BLRectI& maskArea
)noexcept[7/8][¶]

Fills a source mask image specified by maskArea at coordinates specified by origin (floating point coordinates) with the current fill style.

template<typename StyleT>
BLResult BLContext::fillMask(
const BLPoint& origin,
const BLImage& mask,
const BLRectI& maskArea,
const StyleT& style
)noexcept[8/8][¶]

Fills a source mask image specified by maskArea at coordinates specified by origin (floating point coordinates) with an explicit fill style.

BLResult BLContext::strokeBox(
const BLBox& box
)noexcept[1/6][¶]

Strokes a box (floating point coordinates) with the current stroke style.

Note
Box is defined as [x0, y0, x1, y1], if you need [x, y, w, h], use strokeRect() instead.

template<typename StyleT>
BLResult BLContext::strokeBox(
const BLBox& box,
const StyleT& style
)noexcept[2/6][¶]

Strokes a box (floating point coordinates) with an explicit stroke style.

Note
Box is defined as [x0, y0, x1, y1], if you need [x, y, w, h], use strokeRect() instead.

BLResult BLContext::strokeBox(
const BLBoxI& box
)noexcept[3/6][¶]

Strokes a box (integer coordinates) with the current stroke style.

Note
Box is defined as [x0, y0, x1, y1], if you need [x, y, w, h], use strokeRect() instead.

template<typename StyleT>
BLResult BLContext::strokeBox(
const BLBoxI& box,
const StyleT& style
)noexcept[4/6][¶]

Strokes a box (integer coordinates) with an explicit stroke style.

Note
Box is defined as [x0, y0, x1, y1], if you need [x, y, w, h], use strokeRect() instead.

BLResult BLContext::strokeBox(
double x0,
double y0,
double x1,
double y1
)noexcept[5/6][¶]

Strokes a box [x0, y0, x1, y1] (floating point coordinates) with the current stroke style.

Note
Box is defined as [x0, y0, x1, y1], if you need [x, y, w, h], use strokeRect() instead.

template<typename StyleT>
BLResult BLContext::strokeBox(
double x0,
double y0,
double x1,
double y1,
const StyleT& style
)noexcept[6/6][¶]

Strokes a box [x0, y0, x1, y1] (floating point coordinates) with an explicit stroke style.

Note
Box is defined as [x0, y0, x1, y1], if you need [x, y, w, h], use strokeRect() instead.

BLResult BLContext::strokeRect(
const BLRectI& rect
)noexcept[1/6][¶]

Strokes a rectangle rect (integer coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeRect(
const BLRectI& rect,
const StyleT& style
)noexcept[2/6][¶]

Strokes a rectangle rect (integer coordinates) with an explicit stroke style.

BLResult BLContext::strokeRect(
const BLRect& rect
)noexcept[3/6][¶]

Strokes a rectangle rect (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeRect(
const BLRect& rect,
const StyleT& style
)noexcept[4/6][¶]

Strokes a rectangle rect (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeRect(
double x,
double y,
double w,
double h
)noexcept[5/6][¶]

Strokes a rectangle [x, y, w, h] (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeRect(
double x,
double y,
double w,
double h,
const StyleT& style
)noexcept[6/6][¶]

Strokes a rectangle [x, y, w, h] (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeLine(
const BLLine& line
)noexcept[1/6][¶]

Strokes a line specified as line (floating point coordinates) with the default stroke style.

template<typename StyleT>
BLResult BLContext::strokeLine(
const BLLine& line,
const StyleT& style
)noexcept[2/6][¶]

Strokes a line specified as line (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeLine(
const BLPoint& p0,
const BLPoint& p1
)noexcept[3/6][¶]

Strokes a line starting at p0 and ending at p1 (floating point coordinates) with the default stroke style.

template<typename StyleT>
BLResult BLContext::strokeLine(
const BLPoint& p0,
const BLPoint& p1,
const StyleT& style
)noexcept[4/6][¶]

Strokes a line starting at p0 and ending at p1 (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeLine(
double x0,
double y0,
double x1,
double y1
)noexcept[5/6][¶]

Strokes a line starting at [x0, y0] and ending at [x1, y1] (floating point coordinates) with the default stroke style.

template<typename StyleT>
BLResult BLContext::strokeLine(
double x0,
double y0,
double x1,
double y1,
const StyleT& style
)noexcept[6/6][¶]

Strokes a line starting at [x0, y0] and ending at [x1, y1] (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeCircle(
const BLCircle& circle
)noexcept[1/4][¶]

Strokes a circle (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeCircle(
const BLCircle& circle,
const StyleT& style
)noexcept[2/4][¶]

Strokes a circle (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeCircle(
double cx,
double cy,
double r
)noexcept[3/4][¶]

Strokes a circle at [cx, cy] and radius r (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeCircle(
double cx,
double cy,
double r,
const StyleT& style
)noexcept[4/4][¶]

Strokes a circle at [cx, cy] and radius r (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeEllipse(
const BLEllipse& ellipse
)noexcept[1/4][¶]

Strokes an ellipse (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeEllipse(
const BLEllipse& ellipse,
const StyleT& style
)noexcept[2/4][¶]

Strokes an ellipse (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeEllipse(
double cx,
double cy,
double rx,
double ry
)noexcept[3/4][¶]

Strokes an ellipse at [cx, cy] with radius [rx, ry] (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeEllipse(
double cx,
double cy,
double rx,
double ry,
const StyleT& style
)noexcept[4/4][¶]

Strokes an ellipse at [cx, cy] with radius [rx, ry] (floating point coordinates) with en explicit stroke style.

BLResult BLContext::strokeRoundRect(
const BLRoundRect& rr
)noexcept[1/8][¶]

Strokes a rounded rectangle rr (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeRoundRect(
const BLRoundRect& rr,
const StyleT& style
)noexcept[2/8][¶]

Strokes a rounded rectangle rr (floating point coordinates) with en explicit stroke style.

BLResult BLContext::strokeRoundRect(
const BLRect& rect,
double r
)noexcept[3/8][¶]

Strokes a rounded rectangle bounded by rect with radius r with the current stroke style.

BLResult BLContext::strokeRoundRect(
const BLRect& rect,
double rx,
double ry
)noexcept[4/8][¶]

Strokes a rounded rectangle bounded by rect with radius [rx, ry] with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeRoundRect(
const BLRect& rect,
double rx,
double ry,
const StyleT& style
)noexcept[5/8][¶]

Strokes a rounded rectangle bounded by rect with radius [rx, ry] with en explicit stroke style.

BLResult BLContext::strokeRoundRect(
double x,
double y,
double w,
double h,
double r
)noexcept[6/8][¶]

Strokes a rounded rectangle bounded by [x, y, w, h] with radius r with the current stroke style.

BLResult BLContext::strokeRoundRect(
double x,
double y,
double w,
double h,
double rx,
double ry
)noexcept[7/8][¶]

Strokes a rounded rectangle bounded as [x, y, w, h] with radius [rx, ry] with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeRoundRect(
double x,
double y,
double w,
double h,
double rx,
double ry,
const StyleT& style
)noexcept[8/8][¶]

Strokes a rounded rectangle bounded as [x, y, w, h] with radius [rx, ry] with an explicit stroke style.

BLResult BLContext::strokeChord(
const BLArc& chord
)noexcept[1/5][¶]

Strokes a chord (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeChord(
const BLArc& chord,
const StyleT& style
)noexcept[2/5][¶]

Strokes a chord (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeChord(
double cx,
double cy,
double r,
double start,
double sweep
)noexcept[3/5][¶]

Strokes a chord at [cx, cy] with radius r at start of sweep (floating point coordinates) with the current stroke style.

BLResult BLContext::strokeChord(
double cx,
double cy,
double rx,
double ry,
double start,
double sweep
)noexcept[4/5][¶]

Strokes a chord at [cx, cy] with radius [rx, ry] at start of sweep (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeChord(
double cx,
double cy,
double rx,
double ry,
double start,
double sweep,
const StyleT& style
)noexcept[5/5][¶]

Strokes a chord at [cx, cy] with radius [rx, ry] at start of sweep (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokePie(
const BLArc& pie
)noexcept[1/5][¶]

Strokes a pie (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokePie(
const BLArc& pie,
const StyleT& style
)noexcept[2/5][¶]

Strokes a pie (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokePie(
double cx,
double cy,
double r,
double start,
double sweep
)noexcept[3/5][¶]

Strokes a pie at [cx, cy] with radius r at start of sweep (floating point coordinates) with the current stroke style.

BLResult BLContext::strokePie(
double cx,
double cy,
double rx,
double ry,
double start,
double sweep
)noexcept[4/5][¶]

Strokes a pie at [cx, cy] with radius [rx, ry] at start of sweep (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokePie(
double cx,
double cy,
double rx,
double ry,
double start,
double sweep,
const StyleT& style
)noexcept[5/5][¶]

Strokes a pie at [cx, cy] with radius [rx, ry] at start of sweep (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeTriangle(
const BLTriangle& triangle
)noexcept[1/4][¶]

Strokes a triangle (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeTriangle(
const BLTriangle& triangle,
const StyleT& style
)noexcept[2/4][¶]

Strokes a triangle (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeTriangle(
double x0,
double y0,
double x1,
double y1,
double x2,
double y2
)noexcept[3/4][¶]

Strokes a triangle defined by [x0, y0], [x1, y1], [x2, y2] (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeTriangle(
double x0,
double y0,
double x1,
double y1,
double x2,
double y2,
const StyleT& style
)noexcept[4/4][¶]

Strokes a triangle defined by [x0, y0], [x1, y1], [x2, y2] (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokePolyline(
const BLArrayView<BLPoint>& poly
)noexcept[1/8][¶]

Strokes a polyline poly (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokePolyline(
const BLArrayView<BLPoint>& poly,
const StyleT& style
)noexcept[2/8][¶]

Strokes a polyline poly (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokePolyline(
const BLPoint* poly,
size_t n
)noexcept[3/8][¶]

Strokes a polyline poly having n vertices (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokePolyline(
const BLPoint* poly,
size_t n,
const StyleT& style
)noexcept[4/8][¶]

Strokes a polyline poly having n vertices (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokePolyline(
const BLArrayView<BLPointI>& poly
)noexcept[5/8][¶]

Strokes a polyline poly (integer coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokePolyline(
const BLArrayView<BLPointI>& poly,
const StyleT& style
)noexcept[6/8][¶]

Strokes a polyline poly (integer coordinates) with an explicit stroke style.

BLResult BLContext::strokePolyline(
const BLPointI* poly,
size_t n
)noexcept[7/8][¶]

Strokes a polyline poly having n vertices (integer coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokePolyline(
const BLPointI* poly,
size_t n,
const StyleT& style
)noexcept[8/8][¶]

Strokes a polyline poly having n vertices (integer coordinates) with an explicit stroke style.

BLResult BLContext::strokePolygon(
const BLArrayView<BLPoint>& poly
)noexcept[1/8][¶]

Strokes a polygon poly (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokePolygon(
const BLArrayView<BLPoint>& poly,
const StyleT& style
)noexcept[2/8][¶]

Strokes a polygon poly (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokePolygon(
const BLPoint* poly,
size_t n
)noexcept[3/8][¶]

Strokes a polygon poly having n vertices (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokePolygon(
const BLPoint* poly,
size_t n,
const StyleT& style
)noexcept[4/8][¶]

Strokes a polygon poly having n vertices (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokePolygon(
const BLArrayView<BLPointI>& poly
)noexcept[5/8][¶]

Strokes a polygon poly (integer coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokePolygon(
const BLArrayView<BLPointI>& poly,
const StyleT& style
)noexcept[6/8][¶]

Strokes a polygon poly (integer coordinates) with an explicit stroke style.

BLResult BLContext::strokePolygon(
const BLPointI* poly,
size_t n
)noexcept[7/8][¶]

Strokes a polygon poly having n vertices (integer coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokePolygon(
const BLPointI* poly,
size_t n,
const StyleT& style
)noexcept[8/8][¶]

Strokes a polygon poly having n vertices (integer coordinates) with an explicit stroke style.

BLResult BLContext::strokeBoxArray(
const BLArrayView<BLBox>& array
)noexcept[1/8][¶]

Strokes an array of boxes (floating point coordinates) with the default stroke style.

template<typename StyleT>
BLResult BLContext::strokeBoxArray(
const BLArrayView<BLBox>& array,
const StyleT& style
)noexcept[2/8][¶]

Strokes an array of boxes (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeBoxArray(
const BLBox* array,
size_t n
)noexcept[3/8][¶]

Strokes an array of boxes of size n (floating point coordinates) with the default stroke style.

template<typename StyleT>
BLResult BLContext::strokeBoxArray(
const BLBox* array,
size_t n,
const StyleT& style
)noexcept[4/8][¶]

Strokes an array of boxes of size n (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeBoxArray(
const BLArrayView<BLBoxI>& array
)noexcept[5/8][¶]

Strokes an array of boxes (integer coordinates) with the default stroke style.

template<typename StyleT>
BLResult BLContext::strokeBoxArray(
const BLArrayView<BLBoxI>& array,
const StyleT& style
)noexcept[6/8][¶]

Strokes an array of boxes (integer coordinates) with an explicit stroke style.

BLResult BLContext::strokeBoxArray(
const BLBoxI* array,
size_t n
)noexcept[7/8][¶]

Strokes an array of boxes of size n (integer coordinates) with the default stroke style.

template<typename StyleT>
BLResult BLContext::strokeBoxArray(
const BLBoxI* array,
size_t n,
const StyleT& style
)noexcept[8/8][¶]

Strokes an array of boxes of size n (integer coordinates) with an explicit stroke style.

BLResult BLContext::strokeRectArray(
const BLArrayView<BLRect>& array
)noexcept[1/8][¶]

Strokes an array of rectangles (floating point coordinates) with the default stroke style.

template<typename StyleT>
BLResult BLContext::strokeRectArray(
const BLArrayView<BLRect>& array,
const StyleT& style
)noexcept[2/8][¶]

Strokes an array of rectangles (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeRectArray(
const BLRect* array,
size_t n
)noexcept[3/8][¶]

Strokes an array of rectangles of size n (floating point coordinates) with the default stroke style.

template<typename StyleT>
BLResult BLContext::strokeRectArray(
const BLRect* array,
size_t n,
const StyleT& style
)noexcept[4/8][¶]

Strokes an array of rectangles of size n (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeRectArray(
const BLArrayView<BLRectI>& array
)noexcept[5/8][¶]

Strokes an array of rectangles (integer coordinates) with the default stroke style.

template<typename StyleT>
BLResult BLContext::strokeRectArray(
const BLArrayView<BLRectI>& array,
const StyleT& style
)noexcept[6/8][¶]

Strokes an array of rectangles (integer coordinates) with an explicit stroke style.

BLResult BLContext::strokeRectArray(
const BLRectI* array,
size_t n
)noexcept[7/8][¶]

Strokes an array of rectangles of size n (integer coordinates) with the default stroke style.

template<typename StyleT>
BLResult BLContext::strokeRectArray(
const BLRectI* array,
size_t n,
const StyleT& style
)noexcept[8/8][¶]

Strokes an array of rectangles of size n (integer coordinates) with an explicit stroke style.

BLResult BLContext::strokePath(
const BLPathCore& path
)noexcept[1/4][¶]

Strokes the given path with the default stroke style.

template<typename StyleT>
BLResult BLContext::strokePath(
const BLPathCore& path,
const StyleT& style
)noexcept[2/4][¶]

Strokes the given path with an explicit stroke style.

BLResult BLContext::strokePath(
const BLPoint& origin,
const BLPathCore& path
)noexcept[3/4][¶]

Strokes the given path translated by origin with the default stroke style.

template<typename StyleT>
BLResult BLContext::strokePath(
const BLPoint& origin,
const BLPathCore& path,
const StyleT& style
)noexcept[4/4][¶]

Strokes the given path translated by origin with an explicit stroke style.

BLResult BLContext::strokeGeometry(
const void* data
)noexcept[1/2][¶]

Strokes the passed geometry specified by geometry type and data with the default stroke style.

Note
This function provides a low-level interface that can be used in cases in which geometry 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.

template<typename StyleT>
BLResult BLContext::strokeGeometry(
const void* data,
const StyleT& style
)noexcept[2/2][¶]

Strokes the passed geometry specified by geometry type and data with an explicit stroke style.

Note
This function provides a low-level interface that can be used in cases in which geometry 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.

BLResult BLContext::strokeUtf8Text(
const BLPointI& origin,
const BLFontCore& font,
const char* text,
size_t size = SIZE_MAX
)noexcept[1/8][¶]

Strokes UTF-8 encoded string passed as text and size by using the given font at origin (integer coordinates) with the default stroke style.

Note
The 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`.

template<typename StyleT>
BLResult BLContext::strokeUtf8Text(
const BLPointI& origin,
const BLFontCore& font,
const char* text,
size_t size,
const StyleT& style
)noexcept[2/8][¶]

Strokes UTF-8 encoded string passed as text and size by using the given font at origin (integer coordinates) with an explicit stroke style.

Note
Pass 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`.

BLResult BLContext::strokeUtf8Text(
const BLPointI& origin,
const BLFontCore& font,
const BLStringView& view
)noexcept[3/8][¶]

Strokes UTF-8 encoded string passed as string view by using the given font at origin (floating point coordinates) with the default stroke style.

template<typename StyleT>
BLResult BLContext::strokeUtf8Text(
const BLPointI& origin,
const BLFontCore& font,
const BLStringView& view,
const StyleT& style
)noexcept[4/8][¶]

Strokes UTF-8 encoded string passed as string view by using the given font at origin (floating point coordinates) with an explicit stroke style.

BLResult BLContext::strokeUtf8Text(
const BLPoint& origin,
const BLFontCore& font,
const char* text,
size_t size = SIZE_MAX
)noexcept[5/8][¶]

Strokes UTF-8 encoded string passed as text and size by using the given font at origin (integer coordinates) with the default stroke style.

Note
The 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`.

template<typename StyleT>
BLResult BLContext::strokeUtf8Text(
const BLPoint& origin,
const BLFontCore& font,
const char* text,
size_t size,
const StyleT& style
)noexcept[6/8][¶]

Strokes UTF-8 encoded string passed as text and size by using the given font at origin (integer coordinates) with an explicit stroke style.

Note
Pass 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`.

BLResult BLContext::strokeUtf8Text(
const BLPoint& origin,
const BLFontCore& font,
const BLStringView& view
)noexcept[7/8][¶]

Strokes UTF-8 encoded string passed as string view by using the given font at origin (floating point coordinates).

template<typename StyleT>
BLResult BLContext::strokeUtf8Text(
const BLPoint& origin,
const BLFontCore& font,
const BLStringView& view,
const StyleT& style
)noexcept[8/8][¶]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

BLResult BLContext::strokeUtf16Text(
const BLPointI& origin,
const BLFontCore& font,
const uint16_t* text,
size_t size = SIZE_MAX
)noexcept[1/4][¶]

Strokes UTF-16 encoded string passed as text and size by using the given font at origin (integer coordinates) with the default stroke style.

Note
The 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).

template<typename StyleT>
BLResult BLContext::strokeUtf16Text(
const BLPointI& origin,
const BLFontCore& font,
const uint16_t* text,
size_t size,
const StyleT& style
)noexcept[2/4][¶]

Strokes UTF-16 encoded string passed as text and size by using the given font at origin (integer coordinates) with an explicit stroke style.

Note
Pass 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).

BLResult BLContext::strokeUtf16Text(
const BLPoint& origin,
const BLFontCore& font,
const uint16_t* text,
size_t size = SIZE_MAX
)noexcept[3/4][¶]

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.

Note
The 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).

template<typename StyleT>
BLResult BLContext::strokeUtf16Text(
const BLPoint& origin,
const BLFontCore& font,
const uint16_t* text,
size_t size,
const StyleT& style
)noexcept[4/4][¶]

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.

Note
Pass 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).

BLResult BLContext::strokeUtf32Text(
const BLPointI& origin,
const BLFontCore& font,
const uint32_t* text,
size_t size = SIZE_MAX
)noexcept[1/4][¶]

Strokes UTF-32 encoded string passed as text and size by using the given font at origin (integer coordinates) with the default stroke style.

Note
The 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).

template<typename StyleT>
BLResult BLContext::strokeUtf32Text(
const BLPointI& origin,
const BLFontCore& font,
const uint32_t* text,
size_t size,
const StyleT& style
)noexcept[2/4][¶]

Strokes UTF-32 encoded string passed as text and size by using the given font at origin (integer coordinates) with an explicit stroke style.

Note
Pass 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).

BLResult BLContext::strokeUtf32Text(
const BLPoint& origin,
const BLFontCore& font,
const uint32_t* text,
size_t size = SIZE_MAX
)noexcept[3/4][¶]

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.

Note
The 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).

template<typename StyleT>
BLResult BLContext::strokeUtf32Text(
const BLPoint& origin,
const BLFontCore& font,
const uint32_t* text,
size_t size,
const StyleT& style
)noexcept[4/4][¶]

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.

Note
Pass 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).

BLResult BLContext::strokeGlyphRun(
const BLPointI& origin,
const BLFontCore& font,
const BLGlyphRun& glyphRun
)noexcept[1/4][¶]

Strokes a glyphRun by using the given font at origin (integer coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeGlyphRun(
const BLPointI& origin,
const BLFontCore& font,
const BLGlyphRun& glyphRun,
const StyleT& style
)noexcept[2/4][¶]

Strokes a glyphRun by using the given font at origin (integer coordinates) with an explicit stroke style.

BLResult BLContext::strokeGlyphRun(
const BLPoint& origin,
const BLFontCore& font,
const BLGlyphRun& glyphRun
)noexcept[3/4][¶]

Strokes the passed glyphRun by using the given font at origin (floating point coordinates) with the current stroke style.

template<typename StyleT>
BLResult BLContext::strokeGlyphRun(
const BLPoint& origin,
const BLFontCore& font,
const BLGlyphRun& glyphRun,
const StyleT& style
)noexcept[4/4][¶]

Strokes the passed glyphRun by using the given font at origin (floating point coordinates) with an explicit stroke style.

BLResult BLContext::blitImage(
const BLPointI& origin,
const BLImageCore& src
)noexcept[1/8][¶]

Blits source image src at coordinates specified by origin (int coordinates).

BLResult BLContext::blitImage(
const BLPointI& origin,
const BLImageCore& src,
const BLRectI& srcArea
)noexcept[2/8][¶]

Blits an area in source image src specified by srcArea at coordinates specified by origin (int coordinates).

BLResult BLContext::blitImage(
const BLPoint& origin,
const BLImageCore& src
)noexcept[3/8][¶]

Blits source image src at coordinates specified by origin (floating point coordinates).

BLResult BLContext::blitImage(
const BLPoint& origin,
const BLImageCore& src,
const BLRectI& srcArea
)noexcept[4/8][¶]

Blits an area of source image src specified by srcArea at coordinates specified by origin (floating point coordinates).

BLResult BLContext::blitImage(
const BLRectI& rect,
const BLImageCore& src
)noexcept[5/8][¶]

Blits a source image src scaled to fit into rect rectangle (int coordinates).

BLResult BLContext::blitImage(
const BLRectI& rect,
const BLImageCore& src,
const BLRectI& srcArea
)noexcept[6/8][¶]

Blits an area of source image src specified by srcArea scaled to fit into rect rectangle (int coordinates).

BLResult BLContext::blitImage(
const BLRect& rect,
const BLImageCore& src
)noexcept[7/8][¶]

Blits a source image src scaled to fit into rect rectangle (floating point coordinates).

BLResult BLContext::blitImage(
const BLRect& rect,
const BLImageCore& src,
const BLRectI& srcArea
)noexcept[8/8][¶]

Blits an area of source image src specified by srcArea scaled to fit into rect rectangle (floating point coordinates).