Sign in

    crater-painter

    Paint tree, image output, and SVG packages for crater

    Download zip
    Author
    Version
    0.17.1
    License
    Apache-2.0
    Last updated
    5 months ago
    Downloads
    7K

    mizchi/crater-painter does not have a README file

    BoundingBox

    Bounding box for a shape

    Camera

    Camera for 2D scene navigation Supports pan (translation) and zoom

    Color

    RGB Color (0-255 range)

    DynamicPalette

    Dynamic color palette that builds from PaintNode colors

    Framebuffer

    Simple framebuffer for rendering

    GlyphProvider

    Provides glyph outlines and advance widths for text rendering.

    PathCommand

    SVG path commands (full SVG 1.1 spec)

    RenderContext

    Render context for drawing

    SVGNode

    SVG node (element in the scene graph)

    Scene

    Scene represents a renderable SVG scene with optimization support

    Transform

    2D affine transformation matrix | a c e | | b d f | | 0 0 1 |

    attributes_to_svg_node

    fn attributes_to_svg_node(tag : String, attributes : Array[(String, String)]) ->
    SVGNode

    circle

    fn circle(id : String, cx : Double, cy : Double, r : Double) ->
    SVGNode

    create_svg_layout

    fn create_svg_layout(tag : String, attributes : Array[(String, String)], width : Double, available_height? : Double) ->
    Layout

    find_scrollable_at

    fn find_scrollable_at(node :
    PaintNode
    , x : Double, y : Double, viewport_width : Double, viewport_height : Double) ->
    ScrollableHitResult
    ?

    line

    fn line(id : String, x1 : Double, y1 : Double, x2 : Double, y2 : Double) ->
    SVGNode

    parse_svg

    fn parse_svg(svg_str : String) ->
    SVGNode
    ?

    path

    fn path(id : String, d : String) ->
    SVGNode

    rect

    fn rect(id : String, x : Double, y : Double, width : Double, height : Double) ->
    SVGNode

    render_paint_node_to_kitty

    fn render_paint_node_to_kitty(node :
    PaintNode
    , width : Int, height : Int) -> String

    render_paint_node_to_sixel

    fn render_paint_node_to_sixel(node :
    PaintNode
    , width : Int, height : Int) -> String

    render_svg_node_to_sixel

    fn render_svg_node_to_sixel(node :
    SVGNode
    , width : Int, height : Int) -> String

    render_svg_to_kitty

    fn render_svg_to_kitty(scene :
    Scene
    , width : Int, height : Int) -> String

    render_svg_to_sixel

    fn render_svg_to_sixel(scene :
    Scene
    , width : Int, height : Int) -> String

    text

    fn text(id : String, x : Double, y : Double, content : String, font_size : Double) ->
    SVGNode

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io