IndexStyling
Styling

Colors, gradients, and patterns.

Styling provides various classes that represent colors, gradients, and patterns. While colors are used universally across the library (not just as styles), gradients and patterns are always used as fill or stroke styles.

Colors

  • BLRgba - RGBA color specified as 32-bit floating point value per channel
  • BLRgba32 - RGBA color specified as 8-bit value per channel as 0xAARRGGBB
  • BLRgba64 - RGBA color specified as 16-bit value per channel as 0xAAAARRRRGGGGBBBB
  • (please note that the order if bytes in BLRgba32 and BLRgba64 is ARGB (from MSB to LSB) for compatibility with other libraries and common representations)

Gradients

Patterns

Variant

  • BLVar - variant type can be used to hold any style and then passed to the rendering context

Enumerations

Functions

BLGradient - Constants

BLPattern - Constants

Common Functionality

BLExtendMode : uint32_tenum[¶]

Extend mode.

ConstantDescription
BL_EXTEND_MODE_PAD 

Pad extend [default].

BL_EXTEND_MODE_REPEAT 

Repeat extend.

BL_EXTEND_MODE_REFLECT 

Reflect extend.

BL_EXTEND_MODE_PAD_X_PAD_Y 

Alias of BL_EXTEND_MODE_PAD.

BL_EXTEND_MODE_PAD_X_REPEAT_Y 

Pad X and repeat Y.

BL_EXTEND_MODE_PAD_X_REFLECT_Y 

Pad X and reflect Y.

BL_EXTEND_MODE_REPEAT_X_REPEAT_Y 

Alias of BL_EXTEND_MODE_REPEAT.

BL_EXTEND_MODE_REPEAT_X_PAD_Y 

Repeat X and pad Y.

BL_EXTEND_MODE_REPEAT_X_REFLECT_Y 

Repeat X and reflect Y.

BL_EXTEND_MODE_REFLECT_X_REFLECT_Y 

Alias of BL_EXTEND_MODE_REFLECT.

BL_EXTEND_MODE_REFLECT_X_PAD_Y 

Reflect X and pad Y.

BL_EXTEND_MODE_REFLECT_X_REPEAT_Y 

Reflect X and repeat Y.

BL_EXTEND_MODE_SIMPLE_MAX_VALUE 

Count of simple extend modes (that use the same value for X and Y).

BL_EXTEND_MODE_COMPLEX_MAX_VALUE 

Count of complex extend modes (that can use independent values for X and Y).

BL_EXTEND_MODE_MAX_VALUE 

Maximum value of BLExtendMode.

BLGradientType : uint32_tenum[¶]

Gradient type.

ConstantDescription
BL_GRADIENT_TYPE_LINEAR 

Linear gradient type.

BL_GRADIENT_TYPE_RADIAL 

Radial gradient type.

BL_GRADIENT_TYPE_CONIC 

Conic gradient type.

BL_GRADIENT_TYPE_MAX_VALUE 

Maximum value of BLGradientType.

BLGradientValue : uint32_tenum[¶]

Gradient data index.

ConstantDescription
BL_GRADIENT_VALUE_COMMON_X0 

x0 - start 'x' for a Linear gradient and x center for both Radial and Conic gradients.

BL_GRADIENT_VALUE_COMMON_Y0 

y0 - start 'y' for a Linear gradient and y center for both Radial and Conic gradients.

BL_GRADIENT_VALUE_COMMON_X1 

x1 - end 'x' for a Linear gradient and focal point x for a Radial gradient.

BL_GRADIENT_VALUE_COMMON_Y1 

y1 - end 'y' for a Linear/gradient and focal point y for a Radial gradient.

BL_GRADIENT_VALUE_RADIAL_R0 

Radial gradient center radius.

BL_GRADIENT_VALUE_RADIAL_R1 

Radial gradient focal radius.

BL_GRADIENT_VALUE_CONIC_ANGLE 

Conic gradient angle.

BL_GRADIENT_VALUE_CONIC_REPEAT 

Conic gradient angle.

BL_GRADIENT_VALUE_MAX_VALUE 

Maximum value of BLGradientValue.

BLGradientQuality : uint32_tenum[¶]

Gradient rendering quality.

ConstantDescription
BL_GRADIENT_QUALITY_NEAREST 

Nearest neighbor.

BL_GRADIENT_QUALITY_SMOOTH 

Use smoothing, if available (currently never available).

BL_GRADIENT_QUALITY_DITHER 

The renderer will use an implementation-specific dithering algorithm to prevent banding.

BL_GRADIENT_QUALITY_MAX_VALUE 

Maximum value of BLGradientQuality.

BLPatternQuality : uint32_tenum[¶]

Pattern quality.

ConstantDescription
BL_PATTERN_QUALITY_NEAREST 

Nearest neighbor interpolation.

BL_PATTERN_QUALITY_BILINEAR 

Bilinear interpolation.

BL_PATTERN_QUALITY_MAX_VALUE 

Maximum value of BLPatternQuality.