API Reference

Blend2D C/C++ API reference documentation generated by Doxygen.

Introduction

Blend2D API consists of enumerations, functions, structs, and C++ classes. Common concepts like enumerations and POD structs are shared between C and C++. Some structs contain extra functionality like BLSomething::reset() that is only available to C++ users, however, such functionality is only provided for convenience and doesn't affect how Blend2D can be used from C.

Blend2D C++ API is in fact build on top of the C API and all C++ functions are inlines that call C API without any overhead. It would require double effort to document both C and C++ APIs separately so we have decided to only document C++ API and to only list C API for users that need it. The C API should be straightforward and matches very well the C++ part.

Important

Doxygen sorts struct members in anonymous structs and unions and we haven't figured out how to turn this off. This means that the order of members in "Public Attributes" doesn't have to reflect the original struct packing. Always double-check struct members in case you plan to use a brace initialization of simple structs.

Groups

The documentation is split into the following groups:

  • Global API - Global functions, constants, and classes used universally across the library
  • Geometry API - Geometries, paths, and transformations
  • Imaging API - Images and image codecs
  • Styling API - Colors, gradients, and patterns
  • Text API - Fonts & Text support
  • Rendering Context - 2D rendering context API, structures, and constants
  • Runtime API - Interaction with Blend2D runtime
  • Filesystem API - Filesystem utilities
  • Impl API - API required for extending Blend2D functionality
  • Macros - Preprocessor macros and compile-time constants
  • C API - Global C API functions exported as extern "C" (C API)
  • Object Model - Object Model & Memory Layout