Sign in

    KKKIIO/selene/render2d_types does not have a README file

    CircleDrawCommand2D

    ClipRectCommand2D

    pub(all) struct ClipRectCommand2D {
    rect :
    Rect

    }

    ColoredGeometryDrawCommand2D

    pub(all) struct ColoredGeometryDrawCommand2D {
    triangles : Array[ColoredTriangle2D]
    alpha_mode :
    AlphaMode2D

    blend_mode :
    BlendMode2D

    }

    ColoredTriangle2D

    pub(all) struct ColoredTriangle2D {
    a : ColoredVertex2D
    b : ColoredVertex2D
    c : ColoredVertex2D
    } derive(Eq,
    Debug
    )

    ColoredVertex2D

    pub(all) struct ColoredVertex2D {
    position :
    Vec2

    color :
    Color

    } derive(Eq,
    Debug
    )

    DrawCommand2D

    pub(all) enum DrawCommand2D {
    Image(ImageDrawCommand2D)
    ImageMaterial(ImageMaterialDrawCommand2D)
    Text(TextDrawCommand2D)
    Rect(RectDrawCommand2D)
    Circle(CircleDrawCommand2D)
    Geometry(GeometryDrawCommand2D)
    GradientRect(GradientRectDrawCommand2D)
    RoundedChrome(RoundedChromeDrawCommand2D)
    ColoredGeometry(ColoredGeometryDrawCommand2D)
    PushClip(ClipRectCommand2D)
    PopClip
    }

    EdgeWidths2D

    pub(all) struct EdgeWidths2D {
    top : Double
    right : Double
    bottom : Double
    left : Double
    } derive(Eq, Hash,
    Debug
    )

    FontWeight

    pub(all) struct FontWeight(UInt) derive(Eq, Hash,
    Debug
    )

    FontWeight::black

    fn FontWeight::black() -> FontWeight

    FontWeight::bold

    fn FontWeight::bold() -> FontWeight

    FontWeight::clamp

    fn FontWeight::clamp(self : FontWeight) -> FontWeight

    FontWeight::extra_black

    fn FontWeight::extra_black() -> FontWeight

    FontWeight::extra_bold

    fn FontWeight::extra_bold() -> FontWeight

    FontWeight::extra_light

    fn FontWeight::extra_light() -> FontWeight

    FontWeight::light

    fn FontWeight::light() -> FontWeight

    FontWeight::medium

    fn FontWeight::medium() -> FontWeight

    FontWeight::new

    fn FontWeight::new(value : UInt) -> FontWeight

    FontWeight::normal

    fn FontWeight::normal() -> FontWeight

    FontWeight::semi_bold

    fn FontWeight::semi_bold() -> FontWeight

    FontWeight::thin

    fn FontWeight::thin() -> FontWeight

    FontWeight::value

    fn FontWeight::value(self : FontWeight) -> UInt

    GeometryDrawCommand2D

    A backend-independent, non-indexed 2D geometry draw command.

    Triangle vertices are grouped in threes and line vertices in pairs. The local vertices are transformed first, then translated by origin.

    GeometryTopology2D

    pub(all) enum GeometryTopology2D {
    TriangleList
    LineList
    } derive(Eq,
    Debug
    )

    Backend-independent topology for untextured 2D geometry.

    GradientRectDrawCommand2D

    GradientStop2D

    pub(all) struct GradientStop2D {
    offset : Double
    color :
    Color

    } derive(Eq,
    Debug
    )

    ImageDropShadow2D

    pub(all) struct ImageDropShadow2D {
    offset :
    Vec2

    blur_radius : Double
    color :
    Color

    } derive(Eq,
    Debug
    )

    ImageDropShadow2D::ImageDropShadow2D

    fn ImageDropShadow2D::ImageDropShadow2D(color :
    Color
    , offset? :
    Vec2
    , blur_radius? : Double) -> ImageDropShadow2D

    ImageMaterialDrawCommand2D

    pub(all) struct ImageMaterialDrawCommand2D {
    image : ImageDrawCommand2D
    opacity : Double
    brightness : Double
    saturation : Double
    drop_shadow : ImageDropShadow2D?
    }

    ImageMaterialDrawCommand2D::ImageMaterialDrawCommand2D

    fn ImageMaterialDrawCommand2D::ImageMaterialDrawCommand2D(image : ImageDrawCommand2D, opacity? : Double, brightness? : Double, saturation? : Double, drop_shadow? : ImageDropShadow2D?) -> ImageMaterialDrawCommand2D

    ImageMaterialDrawCommand2D::is_neutral

    ImageRegion2D

    pub(all) struct ImageRegion2D {
    position :
    Vec2

    size :
    Vec2

    } derive(Eq,
    Debug
    )

    PathGeometry2D

    pub(all) struct PathGeometry2D {
    commands : Array[PathCommand2D]
    bounds_position :
    Vec2

    bounds_size :
    Vec2

    } derive(Eq,
    Debug
    )

    PathStretch2D

    pub(all) enum PathStretch2D {
    None
    Fill
    Uniform
    } derive(Eq,
    Debug
    )

    PathTessellation2D

    pub(all) struct PathTessellation2D {
    fill_vertices : Array[
    Vec2
    ]
    stroke_vertices : Array[
    Vec2
    ]
    } derive(Eq,
    Debug
    )

    RenderFrame2D

    pub(all) struct RenderFrame2D {
    passes : Array[RenderPass2D]
    world_commands : Array[DrawCommand2D]
    ui_commands : Array[DrawCommand2D]
    }

    RenderPass2D

    pub(all) struct RenderPass2D {
    camera_entity_id : UInt?
    order : Int
    viewport :
    Rect

    load_op : RenderPassLoadOp2D
    clear_color :
    Color

    target : RenderPassTarget2D
    world_commands : Array[DrawCommand2D]
    ui_commands : Array[DrawCommand2D]
    world_batches : Array[Array[DrawCommand2D]]
    ui_batches : Array[Array[DrawCommand2D]]
    }

    RenderPassLoadOp2D

    pub(all) enum RenderPassLoadOp2D {
    Load
    Clear
    } derive(Eq,
    Debug
    )

    RenderPassTarget2D

    pub(all) enum RenderPassTarget2D {
    Screen
    Offscreen(String)
    } derive(Eq,
    Debug
    )

    RoundedChromeDrawCommand2D

    pub(all) struct RoundedChromeDrawCommand2D {
    rect :
    Rect

    radii : RoundedCornerRadii2D
    fill_color :
    Color
    ?
    border_widths : EdgeWidths2D
    border_color :
    Color
    ?
    outline : RoundedOutline2D?
    shadows : Array[RoundedShadowLayer2D]
    output_scale : Double
    alpha_mode :
    AlphaMode2D

    blend_mode :
    BlendMode2D

    } derive(Eq, Hash,
    Debug
    )

    RoundedCornerRadii2D

    pub(all) struct RoundedCornerRadii2D {
    top_left : Double
    top_right : Double
    bottom_right : Double
    bottom_left : Double
    } derive(Eq, Hash,
    Debug
    )

    RoundedOutline2D

    pub(all) struct RoundedOutline2D {
    width : Double
    offset : Double
    color :
    Color

    } derive(Eq, Hash,
    Debug
    )

    RoundedShadowLayer2D

    pub(all) struct RoundedShadowLayer2D {
    offset :
    Vec2

    spread : Double
    blur : Double
    color :
    Color

    } derive(Eq, Hash,
    Debug
    )

    TextDrawCommand2D

    pub(all) struct TextDrawCommand2D {
    text : String
    sections : Array[TextSection2D]
    position :
    Vec2

    transform :
    Transform

    blend_mode :
    BlendMode2D

    style : TextStyle2D
    max_width : Double?
    max_height : Double?
    wrap : Bool
    ellipsis : Bool
    }

    TextSection2D

    pub(all) struct TextSection2D {
    text : String
    style : TextStyle2D
    underline : Bool
    }

    TextStyle2D

    pub(all) struct TextStyle2D {
    font :
    FontHandle
    ?
    family : String
    size : Double
    weight : FontWeight
    color :
    Color

    line_height : Double
    letter_spacing : Double
    align :
    HAlign

    baseline :
    VAlign

    }

    empty_render_frame2d

    fn empty_render_frame2d() -> RenderFrame2D

    tessellate_colored_path_geometry

    fn tessellate_colored_path_geometry(geometry : PathGeometry2D, scale :
    Vec2
    , offset :
    Vec2
    , stroke_width : Double, color :
    Color
    , output_scale? : Double) -> Array[ColoredTriangle2D]

    tessellate_gradient_rect

    fn tessellate_gradient_rect(command : GradientRectDrawCommand2D) -> Array[ColoredTriangle2D]

    tessellate_path_geometry

    fn tessellate_path_geometry(geometry : PathGeometry2D, scale :
    Vec2
    , offset :
    Vec2
    , stroke_width : Double, output_scale? : Double) -> PathTessellation2D

    tessellate_rounded_chrome

    fn tessellate_rounded_chrome(command : RoundedChromeDrawCommand2D) -> Array[ColoredTriangle2D]