Containers
Containers and views used by Blend2D.
Blend2D needs certain containers to function, but it cannot use Delphi containers other than TArray<T>
. In addition, the underlying representation of all classes that inherit from TBLObjectCore 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 TBLString, TBLArray<T>, TBLBitArray and other specialized containers.
Views & Common Types
- TBLArrayView<T> - read-only view of an array (any array, not just TBLArray<T>).
- TBLStringView - read-only view of a UTF-8 encoded string.
- TBLRange - start/end range, which can be used with sequential containers.
Sequential Containers
- TBLArray<T> - growable array of
T
elements. Can hold both primitive types and Blend2D objects. - TBLString - 8-bit null terminated string, usually UTF-8 encoded, but it's not a requirement.
Bit Containers
- TBLBitArray - a dense bit-array (stores bits starting from 0 to size, sequentially).