Blend2D
2D Vector Graphics Engine
Makes a version number representing a MAJOR.MINOR.PATCH
combination.
Blend2D library version.
A compile-time constant (macro) that defines byte-order of the target. It can be either 1234
for little-endian targets or 4321
for big-endian targets. Blend2D uses this macro internally, but it's also available to end users as sometimes it could be important for deciding between pixel formats or other important details.
A base API decorator that marks functions and variables exported by Blend2D.
Calling convention used by all exported functions and function callbacks. If you pass callbacks to Blend2D it's strongly advised to decorate the callback explicitly as some compilers provide a way of overriding a global calling convention (like __vectorcall on Windows platform), which would break the use of such callbacks.
Marks functions that should always be inlined.
The same as BL_INLINE possibly combined with __attribute__((artificial))
or __attribute__((nodebug))
if the compiler supports any of them.
The purpose of this macro is to tell the compiler that the function should not need debugging, thus the debug information can be omitted completely. Blend2D uses tris decorator to decorate C++ inline functions that either call C API or that are trivial to improve debugging experience of some tiny abstractions.
Function attribute used by functions that never return (that terminate the process). This attribute is used only once by blRuntimeAssertionFailure() function, which is only used when assertions are enabled. This macro should be considered internal and it's not designed for Blend2D users.
Tells the compiler to issue a warning in case that the return value of a function was not used.
Defined to noexcept
in C++17 mode an nothing in C mode. The reason this macro is provided is because Blend2D C API doesn't use exceptions and is marked as such.
Evaluates to constexpr in C++17 mode.
Defined to noexcept
in C++11 mode an nothing in C mode. This is used to mark Blend2D C API, which is noexcept
by design.
Function attribute that describes functions that have no side effects. The macro expands to __attribute__((__pure__))
when compiling with GCC or Clang if the attribute is supported, otherwise it expands to nothing.
Defines a type with a particular alignment, avoiding the use of alignas() as some compilers have a buggy implementation and restrict alignas() more than a compiler specific attribute.
Macro that tells the C/C++ compiler that the expression ...
evaluates to true. This macro is only used by few places and should be considered internal as you shouldn't need it when using Blend2D library.
A condition is likely.
A condition is unlikely.
Run-time assertion executed in debug builds.
Executes the code within the macro, which is expected to provide a BLResult, which is returned in case that it is not successful (not equal to BL_SUCCESS). This macro is heavily used across the library for error handling and it's also exposed to end users in case they find comfortable using the same error handling technique to handle errors returned by Blend2D or user code returning BLResult.