crater-painter

Paint tree, image output, and SVG packages for crater

moon add mizchi/crater-painter@0.19.0
Download zip
Author
Version
0.19.0
License
Apache-2.0
Last updated
last month
Downloads
2K
README

mizchi/crater-painter does not have a README file

#
BoundingBox

using @mizchi/svg { type BoundingBox }

Bounding box for a shape

#
Camera

using @mizchi/svg { type Camera }

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

#
Color

using @mizchi/svg { type Color }

RGB Color (0-255 range)

#
PathCommand

using @mizchi/svg { type PathCommand }

SVG path commands (full SVG 1.1 spec)

#
RenderContext

using @mizchi/svg { type RenderContext }

Render context for drawing

#
SVGNode

using @mizchi/svg { type SVGNode }

SVG node (element in the scene graph)

#
Scene

using @mizchi/svg { type Scene }

Scene represents a renderable SVG scene with optimization support

#
Transform

using @mizchi/svg { type 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
?

#
group

fn group(id : String, children : Array[
SVGNode
]) ->
SVGNode

#
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

#
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