Blend2D
2D Vector Graphics Engine
BitSet segment.
Segment provides either a dense set of bits starting at start
or a range of bits all set to one. The start of the segment is always aligned to segment size, which can be calculated as 32 * BL_BIT_SET_SEGMENT_WORD_COUNT
. Even ranges are aligned to this value, thus up to 3 segments are used to describe a range that doesn't start/end at the segment boundary.
When the segment describes dense bits its size is always fixed and represents 32 * BL_BIT_SET_SEGMENT_WORD_COUNT
bits, which is currently 128 bits. However, when the segment describes all ones, the first value in data data[0]
describes the last bit of the range, which means that an arbitrary range can be encoded within a single segment.