IndexContainers
Containers

Containers and views used by Blend2D.

Blend2D needs certain containers to function, but it cannot use containers from a C++ standard library because it provides both C-API and C-ABI. In addition, the underlying representation of all classes that inherit from BLObjectCore need to provide reference counting, even for containers, so they can be shared across threads without requiring to do any extra work by Blend2D users.

In addition, Blend2D embraces small data optimization (often described as SSO - small string optimization), which is utilized by BLString, BLArray, BLBitArray, and other specialized containers.

Views & Common Types

  • BLArrayView<T> - read-only view of an array (any array, not just BLArray<T>)
  • BLStringView - read-only view of a string, the view doesn't have to be null terminated
  • BLRange - start/end range, which can be used with sequential containers

Sequential Containers

Bit Containers

Typedefs

BLBitSet - Constants

BLBitSet - C++ API

typedef BLArrayView<char> BLStringView[¶]

View of char[] data used by String.

typedef BLArrayView<uint8_t> BLDataView[¶]

View of untyped data.

using BLBitSetBuilder = BLBitSetBuilderT<512>[¶]

BitSet builder [C++ API] that is configured to have a temporary storage of 512 bits.

BLBitSetConstants : uint32_tenum[¶]

ConstantDescription
BL_BIT_SET_INVALID_INDEX 

Invalid bit-index.

This is the only index that cannot be stored in BLBitSet.

BL_BIT_SET_RANGE_MASK 

Range mask used by BLBitsetSegment::start value - if set the segment is a range of all ones.

BL_BIT_SET_SEGMENT_WORD_COUNT 

Number of words in a BLBitSetSegment.