Blend2D
2D Vector Graphics Engine
2D rendering context API, structures, and constants.
The type of a text rendering operation.
This value specifies the type of the parameter passed to the text rendering API.
BLContextRenderTextOp
internally. Constant | Description |
---|---|
BL_CONTEXT_RENDER_TEXT_OP_UTF8 | UTF-8 text rendering operation - UTF-8 string passed as BLStringView or BLArrayView<uint8_t>. |
BL_CONTEXT_RENDER_TEXT_OP_UTF16 | UTF-16 text rendering operation - UTF-16 string passed as BLArrayView<uint16_t>. |
BL_CONTEXT_RENDER_TEXT_OP_UTF32 | UTF-32 text rendering operation - UTF-32 string passed as BLArrayView<uint32_t>. |
BL_CONTEXT_RENDER_TEXT_OP_LATIN1 | LATIN1 text rendering operation - LATIN1 string is passed as BLStringView or BLArrayView<uint8_t>. |
BL_CONTEXT_RENDER_TEXT_OP_WCHAR |
|
BL_CONTEXT_RENDER_TEXT_OP_GLYPH_RUN | Glyph run text rendering operation - the BLGlyphRun parameter is passed. |
BL_CONTEXT_RENDER_TEXT_OP_MAX_VALUE | Maximum value of |
Rendering context flush flags, used by BLContext::flush().
Constant | Description |
---|---|
BL_CONTEXT_FLUSH_SYNC | Flushes the command queue and waits for its completion (will block until done). |
Rendering context creation flags.
Constant | Description |
---|---|
BL_CONTEXT_CREATE_NO_FLAGS | No flags. |
BL_CONTEXT_CREATE_FLAG_DISABLE_JIT | Disables JIT pipeline generator. |
BL_CONTEXT_CREATE_FLAG_FALLBACK_TO_SYNC | Fallbacks to a synchronous rendering in case that the rendering engine wasn't able to acquire threads. This flag only makes sense when the asynchronous mode was specified by having
|
BL_CONTEXT_CREATE_FLAG_ISOLATED_THREAD_POOL | If this flag is specified and asynchronous rendering is enabled then the context would create its own isolated thread-pool, which is useful for debugging purposes. Do not use this flag in production as rendering contexts with isolated thread-pool have to create and destroy all threads they use. This flag is only useful for testing, debugging, and isolated benchmarking. |
BL_CONTEXT_CREATE_FLAG_ISOLATED_JIT_RUNTIME | If this flag is specified and JIT pipeline generation enabled then the rendering context would create its own isolated JIT runtime. which is useful for debugging purposes. This flag will be ignored if JIT pipeline compilation is either not supported or was disabled by other flags. Do not use this flag in production as rendering contexts with isolated JIT runtime do not use global pipeline cache, that's it, after the rendering context is destroyed the JIT runtime is destroyed with it with all compiled pipelines. This flag is only useful for testing, debugging, and isolated benchmarking. |
BL_CONTEXT_CREATE_FLAG_ISOLATED_JIT_LOGGING | Enables logging to stderr of isolated runtime.
|
BL_CONTEXT_CREATE_FLAG_OVERRIDE_CPU_FEATURES | Override CPU features when creating isolated context. |
Error flags that are accumulated during the rendering context lifetime and that can be queried through BLContext::accumulatedErrorFlags(). The reason why these flags exist is that errors can happen during asynchronous rendering, and there is no way the user can catch these errors.
Constant | Description |
---|---|
BL_CONTEXT_ERROR_NO_FLAGS | No flags. |
BL_CONTEXT_ERROR_FLAG_INVALID_VALUE | The rendering context returned or encountered BL_ERROR_INVALID_VALUE, which is mostly related to the function argument handling. It's very likely some argument was wrong when calling BLContext API. |
BL_CONTEXT_ERROR_FLAG_INVALID_STATE | Invalid state describes something wrong, for example a pipeline compilation error. |
BL_CONTEXT_ERROR_FLAG_INVALID_GEOMETRY | The rendering context has encountered invalid geometry. |
BL_CONTEXT_ERROR_FLAG_INVALID_GLYPH | The rendering context has encountered invalid glyph. |
BL_CONTEXT_ERROR_FLAG_INVALID_FONT | The rendering context has encountered invalid or uninitialized font. |
BL_CONTEXT_ERROR_FLAG_THREAD_POOL_EXHAUSTED | Thread pool was exhausted and couldn't acquire the requested number of threads. |
BL_CONTEXT_ERROR_FLAG_OUT_OF_MEMORY | Out of memory condition. |
BL_CONTEXT_ERROR_FLAG_UNKNOWN_ERROR | Unknown error, which we don't have flag for. |
Specifies the behavior of BLContext::swapStyles() operation.
Specifies how style transformation matrix is combined with the rendering context transformation matrix, used by BLContext::setStyle() function.
Clip mode.
Composition & blending operator.