BLContext Class Reference

Rendering context [C++ API].

Member Functions

Construction & Destruction
Overloaded Operators
Target Information
Context Lifetime and Others
Context Properties
State Management
Transformations
Rendering Hints
Approximation Options
Composition Options
Style Options
Fill Style & Options
Stroke Style & Options
Clip Operations
Clear Operations
Fill Operations
Stroke Operations
Image Blitting

Static Functions

Additional Inherited Members

- Public Attributes inherited from BLContextCore

Constructor & Destructor Documentation

BLContext::BLContext()[1/7]

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)[2/7]

Move constructor.

Moves the other rendering context into this one and resets the other.

BLContext::BLContext(const BLContext& other)[3/7]

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 they also share a state.

Two weak copies of the same rendering context cannot be used by different threads simultaneously.

BLContext::BLContext(BLContextImpl* impl)explicit[4/7]

Initializes this BLContext class with rendering context impl.

Mostly for internal purposes and to keep the API consistent.

BLContext::BLContext(BLImage& target)explicit[5/7]

Creates a new rendering context for rendering to the image target.

BLContext::BLContext(BLImage& target, const BLContextCreateInfo& createInfo)[6/7]

Creates a new rendering context for rendering to the image target.

This overload accepts create options that can be used to change the implementation of the rendering context.

BLContext::BLContext(BLImage& target, const BLContextCreateInfo* createInfo)[7/7]

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

BLContext::~BLContext()

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.

Member Function Documentation

BLContext::operator bool() constexplicit

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.

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

bool BLContext::operator==(const BLContext& other) const

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

bool BLContext::operator!=(const BLContext& other) const

Returns whether this and other are different rendering contexts.

BLSize BLContext::targetSize() const

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

double BLContext::targetWidth() const

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

double BLContext::targetHeight() const

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

BLImage* BLContext::targetImage() const

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

uint32_t BLContext::contextType() const

Returns the type of this context, see BLContextType.

bool BLContext::isNone() const

Tests whether the context is a built-in null instance.

bool BLContext::equals(const BLContext& other) const

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

BLResult BLContext::reset()

Resets this rendering context to the default constructed one.

Similar behavior to the destructor, but the context will still be valid after reset() and would behave like a default constructed context.

BLResult BLContext::begin(BLImage& image)[1/3]

Begins rendering to the given image.

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(BLImage& image, const BLContextCreateInfo& createInfo)[2/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::begin(BLImage& image, const BLContextCreateInfo* createInfo)[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()

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

BLResult BLContext::flush(uint32_t flags)

Flushes the context, see BLContextFlushFlags.

uint32_t BLContext::queryThreadCount() const

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.

uint32_t BLContext::queryAccumulatedErrorFlags() const

Queries accumulated errors as flags, see BLContextErrorFlags.

Errors may accumulate during the lifetime of the rendering context.

size_t BLContext::savedStateCount() const

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

BLResult BLContext::save()[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(BLContextCookie& cookie)[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()[1/2]

Restores the top-most saved context-state.

Possible return conditions:

  • BL_SUCCESS - State was restored successfully.
  • BL_ERROR_NO_STATES_TO_RESTORE - There are no saved states to restore.
  • BL_ERROR_NO_MATCHING_COOKIE - Previous state was saved with cookie, which was not provided. You would need the correct cookie to restore such state.

BLResult BLContext::restore(const BLContextCookie& cookie)[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:

  • BL_SUCCESS - Matching state was restored successfully.
  • BL_ERROR_NO_STATES_TO_RESTORE - There are no saved states to restore.
  • BL_ERROR_NO_MATCHING_COOKIE - The cookie did't match any saved state.

const BLMatrix2D& BLContext::metaMatrix() const

Returns meta-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 userMatrix() and userToMeta().

const BLMatrix2D& BLContext::userMatrix() const

Returns user-matrix.

User matrix contains all transformations that happened to the rendering context unless the context was restored or userToMeta() was called.

BLResult BLContext::_applyMatrixOp(uint32_t opType, const void* opData)

Applies a matrix operation to the current transformation matrix (internal).

BLResult BLContext::setMatrix(const BLMatrix2D& m)

Sets user matrix to m.

BLResult BLContext::resetMatrix()

Resets user matrix to identity.

BLResult BLContext::userToMeta()

Store the result of combining the current MetaMatrix and UserMatrix to MetaMatrix and reset UserMatrix to identity as shown below:

MetaMatrix = MetaMatrix x UserMatrix
UserMatrix = Identity

Please note that this operation is irreversible. The only way to restore both matrices to the state before the call to userToMeta() is to use save() and restore() functions.

const BLContextHints& BLContext::hints() const

Returns rendering hints.

BLResult BLContext::setHint(uint32_t hintType, uint32_t value)

Sets the given rendering hint hintType to the value.

BLResult BLContext::setHints(const BLContextHints& hints)

Sets all rendering hints of this context to the given hints.

const BLApproximationOptions& BLContext::approximationOptions() const

Returns approximation options.

uint32_t BLContext::flattenMode() const

Returns flatten mode (how curves are flattened), see BLFlattenMmode.

BLResult BLContext::setFlattenMode(uint32_t mode)

Sets flatten mode (how curves are flattened), see BLFlattenMmode.

double BLContext::flattenTolerance() const

Returns tolerance used for curve flattening.

BLResult BLContext::setFlattenTolerance(double tolerance)

Sets tolerance used for curve flattening.

uint32_t BLContext::compOp() const

Returns composition operator.

BLResult BLContext::setCompOp(uint32_t compOp)

Sets composition operator to compOp, see BLCompOp.

double BLContext::globalAlpha() const

Returns global alpha value.

BLResult BLContext::setGlobalAlpha(double alpha)

Sets global alpha value.

double BLContext::styleAlpha(uint32_t opType) const

Returns fill or alpha value dependeing on the rendering operation opType.

The function behaves like fillAlpha() or strokeAlpha() depending on opType value, see BLContextOpType.

BLResult BLContext::setStyleAlpha(uint32_t opType, double alpha)

Set fill or stroke alpha value depending on the rendering operation opType.

The function behaves like setFillAlpha() or setStrokeAlpha() depending on opType value, see BLContextOpType.

double BLContext::fillAlpha() const

Returns fill alpha value.

BLResult BLContext::setFillAlpha(double alpha)

Sets fill alpha value.

uint32_t BLContext::fillRule() const

Returns fill-rule, see BLFillRule.

BLResult BLContext::setFillRule(uint32_t fillRule)

Sets fill-rule, see BLFillRule.

double BLContext::strokeWidth() const

Returns stroke width.

double BLContext::strokeMiterLimit() const

Returns stroke miter-limit.

uint32_t BLContext::strokeJoin() const

Returns stroke join, see BLStrokeJoin.

uint32_t BLContext::strokeStartCap() const

Returns stroke start-cap, see BLStrokeCap.

uint32_t BLContext::strokeEndCap() const

Returns stroke end-cap, see BLStrokeCap.

double BLContext::strokeDashOffset() const

Returns stroke dash-offset.

const BLArray<double>& BLContext::strokeDashArray() const

Returns stroke dash-array.

uint32_t BLContext::strokeTransformOrder() const

Returns stroke transform order, see BLStrokeTransformOrder.

const BLStrokeOptions& BLContext::strokeOptions() const

Returns stroke options as a reference to BLStrokeOptions.

BLResult BLContext::setStrokeWidth(double width)

Sets stroke width to width.

BLResult BLContext::setStrokeMiterLimit(double miterLimit)

Sets miter limit to miterLimit.

BLResult BLContext::setStrokeJoin(uint32_t strokeJoin)

Sets stroke join to strokeJoin, see BLStrokeJoin.

BLResult BLContext::setStrokeCap(uint32_t type, uint32_t strokeCap)

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

BLResult BLContext::setStrokeStartCap(uint32_t strokeCap)

Sets stroke start cap to strokeCap, see BLStrokeCap.

BLResult BLContext::setStrokeEndCap(uint32_t strokeCap)

Sets stroke end cap to strokeCap, see BLStrokeCap.

BLResult BLContext::setStrokeCaps(uint32_t strokeCap)

Sets all stroke caps to strokeCap, see BLStrokeCap.

BLResult BLContext::setStrokeDashOffset(double dashOffset)

Sets stroke dash-offset to dashOffset.

BLResult BLContext::setStrokeDashArray(const BLArray<double>& dashArray)

Sets stroke dash-array to dashArray.

BLResult BLContext::setStrokeTransformOrder(uint32_t transformOrder)

Sets stroke transformation order to transformOrder, see BLStrokeTransformOrder.

BLResult BLContext::setStrokeOptions(const BLStrokeOptions& options)

Sets all stroke options.

double BLContext::strokeAlpha() const

Returns stroke alpha value.

BLResult BLContext::setStrokeAlpha(double alpha)

Sets stroke alpha value to alpha.

BLResult BLContext::restoreClipping()

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

Clear everything.

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

Clears a rectangle rect.

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

Clears a rectangle rect.

BLResult BLContext::clearRect(double x, double y, double w, double h)[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::fillGeometry(uint32_t geometryType, const void* geometryData)

Fills the passed geometry specified by geometryType and geometryData [Internal].

BLResult BLContext::fillAll()

Fills everything.

BLResult BLContext::fillBox(const BLBox& box)

Fills a box.

BLResult BLContext::fillRect(const BLRectI& rect)[1/3]

Fills a rectangle rect.

BLResult BLContext::fillRect(const BLRect& rect)[2/3]

Fills a rectangle rect.

BLResult BLContext::fillRect(double x, double y, double w, double h)[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::fillCircle(const BLCircle& circle)[1/2]

Fills a circle.

BLResult BLContext::fillCircle(double cx, double cy, double r)[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::fillEllipse(const BLEllipse& ellipse)[1/2]

Fills an ellipse.

BLResult BLContext::fillEllipse(double cx, double cy, double rx, double ry)[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::fillRoundRect(const BLRoundRect& rr)[1/5]

Fills a rounded rectangle.

BLResult BLContext::fillRoundRect(const BLRect& rect, double r)[2/5]

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

BLResult BLContext::fillRoundRect(const BLRect& rect, double rx, double ry)[3/5]

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

BLResult BLContext::fillRoundRect(double x, double y, double w, double h, double r)[4/5]

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

BLResult BLContext::fillRoundRect(double x, double y, double w, double h, double rx, double ry)[5/5]

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

BLResult BLContext::fillChord(const BLArc& chord)[1/3]

Fills a chord.

BLResult BLContext::fillChord(double cx, double cy, double r, double start, double sweep)[2/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::fillChord(double cx, double cy, double rx, double ry, double start, double sweep)[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::fillPie(const BLArc& pie)[1/3]

Fills a pie.

BLResult BLContext::fillPie(double cx, double cy, double r, double start, double sweep)[2/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::fillPie(double cx, double cy, double rx, double ry, double start, double sweep)[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::fillTriangle(const BLTriangle& triangle)[1/2]

Fills a triangle.

BLResult BLContext::fillTriangle(double x0, double y0, double x1, double y1, double x2, double y2)[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::fillPolygon(const BLArrayView<BLPoint>& poly)[1/4]

Fills a polygon.

BLResult BLContext::fillPolygon(const BLPoint* poly, size_t n)[2/4]

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

BLResult BLContext::fillPolygon(const BLArrayView<BLPointI>& poly)[3/4]

Fills a polygon.

BLResult BLContext::fillPolygon(const BLPointI* poly, size_t n)[4/4]

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

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

Fills an array of boxes.

BLResult BLContext::fillBoxArray(const BLBox* data, size_t n)[2/4]

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

BLResult BLContext::fillBoxArray(const BLArrayView<BLBoxI>& array)[3/4]

Fills an array of boxes.

BLResult BLContext::fillBoxArray(const BLBoxI* data, size_t n)[4/4]

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

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

Fills an array of rectangles.

BLResult BLContext::fillRectArray(const BLRect* data, size_t n)[2/4]

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

BLResult BLContext::fillRectArray(const BLArrayView<BLRectI>& array)[3/4]

Fills an array of rectangles.

BLResult BLContext::fillRectArray(const BLRectI* data, size_t n)[4/4]

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

BLResult BLContext::fillRegion(const BLRegion& region)

Fills the given region.

BLResult BLContext::fillPath(const BLPath& path)

Fills the given path.

BLResult BLContext::fillUtf8Text(const BLPointI& dst, const BLFont& font, const char* text, size_t size = SIZE_MAX)[1/2]

Fills the passed UTF-8 text by using the given font.

BLResult BLContext::fillUtf8Text(const BLPoint& dst, const BLFont& font, const char* text, size_t size = SIZE_MAX)[2/2]

Fills the passed UTF-8 text by using the given font.

BLResult BLContext::fillUtf16Text(const BLPointI& dst, const BLFont& font, const uint16_t* text, size_t size = SIZE_MAX)[1/2]

Fills the passed UTF-16 text by using the given font.

BLResult BLContext::fillUtf16Text(const BLPoint& dst, const BLFont& font, const uint16_t* text, size_t size = SIZE_MAX)[2/2]

Fills the passed UTF-16 text by using the given font.

BLResult BLContext::fillUtf32Text(const BLPointI& dst, const BLFont& font, const uint32_t* text, size_t size = SIZE_MAX)[1/2]

Fills the passed UTF-32 text by using the given font.

BLResult BLContext::fillUtf32Text(const BLPoint& dst, const BLFont& font, const uint32_t* text, size_t size = SIZE_MAX)[2/2]

Fills the passed UTF-32 text by using the given font.

BLResult BLContext::fillGlyphRun(const BLPointI& dst, const BLFont& font, const BLGlyphRun& glyphRun)[1/2]

Fills the passed glyphRun by using the given font.

BLResult BLContext::fillGlyphRun(const BLPoint& dst, const BLFont& font, const BLGlyphRun& glyphRun)[2/2]

Fills the passed glyphRun by using the given font.

BLResult BLContext::strokeGeometry(uint32_t geometryType, const void* geometryData)

Strokes the passed geometry specified by geometryType and geometryData [Internal].

BLResult BLContext::strokeBox(const BLBox& box)

Strokes a box.

BLResult BLContext::strokeRect(const BLRect& rect)[1/3]

Strokes a rectangle.

BLResult BLContext::strokeRect(const BLRectI& rect)[2/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::strokeRect(double x, double y, double w, double h)[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::strokeLine(const BLLine& line)[1/3]

Strokes a line.

BLResult BLContext::strokeLine(const BLPoint& p0, const BLPoint& p1)[2/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::strokeLine(double x0, double y0, double x1, double y1)[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::strokeCircle(const BLCircle& circle)[1/2]

Strokes a circle.

BLResult BLContext::strokeCircle(double cx, double cy, double r)[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::strokeEllipse(const BLEllipse& ellipse)[1/2]

Strokes an ellipse.

BLResult BLContext::strokeEllipse(double cx, double cy, double rx, double ry)[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::strokeRoundRect(const BLRoundRect& rr)[1/5]

Strokes a round.

BLResult BLContext::strokeRoundRect(const BLRect& rect, double r)[2/5]

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

BLResult BLContext::strokeRoundRect(const BLRect& rect, double rx, double ry)[3/5]

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

BLResult BLContext::strokeRoundRect(double x, double y, double w, double h, double r)[4/5]

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

BLResult BLContext::strokeRoundRect(double x, double y, double w, double h, double rx, double ry)[5/5]

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

BLResult BLContext::strokeArc(const BLArc& arc)[1/3]

Strokes an arc.

BLResult BLContext::strokeArc(double cx, double cy, double r, double start, double sweep)[2/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::strokeArc(double cx, double cy, double rx, double ry, double start, double sweep)[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::strokeChord(const BLArc& chord)[1/3]

Strokes a chord.

BLResult BLContext::strokeChord(double cx, double cy, double r, double start, double sweep)[2/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::strokeChord(double cx, double cy, double rx, double ry, double start, double sweep)[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::strokePie(const BLArc& pie)[1/3]

Strokes a pie.

BLResult BLContext::strokePie(double cx, double cy, double r, double start, double sweep)[2/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::strokePie(double cx, double cy, double rx, double ry, double start, double sweep)[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::strokeTriangle(const BLTriangle& triangle)[1/2]

Strokes a triangle.

BLResult BLContext::strokeTriangle(double x0, double y0, double x1, double y1, double x2, double y2)[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::strokePolyline(const BLArrayView<BLPoint>& poly)[1/4]

Strokes a polyline.

BLResult BLContext::strokePolyline(const BLPoint* poly, size_t n)[2/4]

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

BLResult BLContext::strokePolyline(const BLArrayView<BLPointI>& poly)[3/4]

Strokes a polyline.

BLResult BLContext::strokePolyline(const BLPointI* poly, size_t n)[4/4]

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

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

Strokes a polygon.

BLResult BLContext::strokePolygon(const BLPoint* poly, size_t n)[2/4]

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

BLResult BLContext::strokePolygon(const BLArrayView<BLPointI>& poly)[3/4]

Strokes a polygon.

BLResult BLContext::strokePolygon(const BLPointI* poly, size_t n)[4/4]

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

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

Strokes an array of boxes.

BLResult BLContext::strokeBoxArray(const BLBox* data, size_t n)[2/4]

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

BLResult BLContext::strokeBoxArray(const BLArrayView<BLBoxI>& array)[3/4]

Strokes an array of boxes.

BLResult BLContext::strokeBoxArray(const BLBoxI* data, size_t n)[4/4]

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

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

Strokes an array of rectangles.

BLResult BLContext::strokeRectArray(const BLRect* data, size_t n)[2/4]

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

BLResult BLContext::strokeRectArray(const BLArrayView<BLRectI>& array)[3/4]

Strokes an array of rectangles.

BLResult BLContext::strokeRectArray(const BLRectI* data, size_t n)[4/4]

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

BLResult BLContext::strokePath(const BLPath& path)

Strokes a path.

BLResult BLContext::strokeUtf8Text(const BLPointI& dst, const BLFont& font, const char* text, size_t size = SIZE_MAX)[1/2]

Strokes the passed UTF-8 text by using the given font.

BLResult BLContext::strokeUtf8Text(const BLPoint& dst, const BLFont& font, const char* text, size_t size = SIZE_MAX)[2/2]

Strokes the passed UTF-8 text by using the given font.

BLResult BLContext::strokeUtf16Text(const BLPointI& dst, const BLFont& font, const uint16_t* text, size_t size = SIZE_MAX)[1/2]

Strokes the passed UTF-16 text by using the given font.

BLResult BLContext::strokeUtf16Text(const BLPoint& dst, const BLFont& font, const uint16_t* text, size_t size = SIZE_MAX)[2/2]

Strokes the passed UTF-16 text by using the given font.

BLResult BLContext::strokeUtf32Text(const BLPointI& dst, const BLFont& font, const uint32_t* text, size_t size = SIZE_MAX)[1/2]

Strokes the passed UTF-32 text by using the given font.

BLResult BLContext::strokeUtf32Text(const BLPoint& dst, const BLFont& font, const uint32_t* text, size_t size = SIZE_MAX)[2/2]

Strokes the passed UTF-32 text by using the given font.

BLResult BLContext::strokeGlyphRun(const BLPointI& dst, const BLFont& font, const BLGlyphRun& glyphRun)[1/2]

Strokes the passed glyphRun by using the given font.

BLResult BLContext::strokeGlyphRun(const BLPoint& dst, const BLFont& font, const BLGlyphRun& glyphRun)[2/2]

Strokes the passed glyphRun by using the given font.

BLResult BLContext::blitImage(const BLPoint& dst, const BLImage& src)[1/8]

Blits source image src at coordinates specified by dst..

BLResult BLContext::blitImage(const BLPoint& dst, const BLImage& src, const BLRectI& srcArea)[2/8]

Blits an area of source image src specified by srcArea at coordinates specified by dst.

BLResult BLContext::blitImage(const BLPointI& dst, const BLImage& src)[3/8]

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

BLResult BLContext::blitImage(const BLPointI& dst, const BLImage& src, const BLRectI& srcArea)[4/8]

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

BLResult BLContext::blitImage(const BLRect& dst, const BLImage& src)[5/8]

Blits a source image src scaled to fit into dst rectangle.

BLResult BLContext::blitImage(const BLRect& dst, const BLImage& src, const BLRectI& srcArea)[6/8]

Blits an area of source image src specified by srcArea scaled to fit into dst rectangle.

BLResult BLContext::blitImage(const BLRectI& dst, const BLImage& src)[7/8]

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

BLResult BLContext::blitImage(const BLRectI& dst, const BLImage& src, const BLRectI& srcArea)[8/8]

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