Blend2D
2D Vector Graphics Engine
BitSet builder [C++ API].
BitSet builder is a low-level utility class that can be used to efficiently build a BitSet in C++. It maintains a configurable buffer (called area) where intermediate bits are set, which are then committed to BitSet when an added bit/range is outside of the area or when user is done with BitSet building. The commit uses blBitSetBuilderCommit() function, which was specifically designed for BLBitSetBuilderT<BitCount>
in addition to the BLBitSetBuilder
alias.
Constructs a new BitSet builder having no BitSet assigned.
Constructs a new BitSet builder having the given bitSet
assigned.
bitSet
- the user must guarantee to not destroy the BitSet before the builder is destroyed or reset. Returns whether the BitSet builder is valid, which means that is has an associated BLBitSet
instance.
Returns an associated BLBitSet
instance that this builder commits to.
Adds a bit to the area maintained by BitSet builder.
If the area of bitIndex
is different compared to the current active area, the current area will be committed to the BitSet. This is actually the only operation that can return BL_ERROR_OUT_OF_MEMORY.
Adds a [startBit, endBit)
range of bits to the BitSet.
If the range is relatively small and fits into a single builder area, it will be added to that area. On the other hand, if the range is large, the area will be kept and the builder would call BLBitSet::addRange() instead. If the are of the range is different compared to the current active area, the data in the current active area will be committed.
Commits changes in the current active area to the BitSet.
Similar to commit(), but the additional parameter newAreaIndex
will be used to set the current active area.
Area words data.
BitSet we are building.