Sign in

    moonbit-community/harfbuzz/paint does not have a README file

    VarIdx

    type VarIdx = UInt

    VarIdx points into an ItemVariationStore (outer:high 16 bits, inner:low 16 bits).

    Affine2x3

    pub(all) struct Affine2x3 {
    xx : Int
    yx : Int
    xy : Int
    yy : Int
    dx : Int
    dy : Int
    var_idx_base : UInt?
    } derive(Eq, Show, ToJson)

    Affine transform (F16DOT16 values), with optional VarIdx base for variation.

    Color

    pub struct Color {
    r : Int
    g : Int
    b : Int
    a : Int
    } derive(Eq, Show, ToJson)

    RGBA color (0..255 per channel).

    Color::from_bgra

    fn Color::from_bgra(b : Int, g : Int, r : Int, a : Int) -> Color

    Helper to build a color from BGRA bytes.

    ColorLine

    pub(all) struct ColorLine {
    extend : Int
    stops : Array[ColorStop]
    } derive(Eq, Show, ToJson)

    Color line for gradients. Extend is raw enum value (0..2).

    ColorStop

    pub(all) struct ColorStop {
    offset : Int
    palette_index : Int
    alpha : Int
    var_idx_base : UInt?
    } derive(Eq, Show, ToJson)

    Color stop for gradients. Offset/alpha are raw F2DOT14 values.

    Paint

    pub(all) enum Paint {
    ColrLayers(Int, Int)
    Solid(Int, Int, UInt?)
    LinearGradient(ColorLine, Int, Int, Int, Int, Int, Int, UInt?)
    RadialGradient(ColorLine, Int, Int, Int, Int, Int, Int, UInt?)
    SweepGradient(ColorLine, Int, Int, Int, Int, UInt?)
    Glyph(Int, Paint)
    ColrGlyph(Int)
    Transform(Affine2x3, Paint)
    Translate(Int, Int, UInt?, Paint)
    Scale(Int, Int, UInt?, Paint)
    ScaleAroundCenter(Int, Int, Int, Int, UInt?, Paint)
    ScaleUniform(Int, UInt?, Paint)
    ScaleUniformAroundCenter(Int, Int, Int, UInt?, Paint)
    Rotate(Int, UInt?, Paint)
    RotateAroundCenter(Int, Int, Int, UInt?, Paint)
    Skew(Int, Int, UInt?, Paint)
    SkewAroundCenter(Int, Int, Int, Int, UInt?, Paint)
    Composite(Int, Paint, Paint)
    } derive(Show, ToJson)

    COLRv1 paint graph nodes.

    var_idx_none

    let var_idx_none : UInt

    Special value indicating no variation.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io