Lampese/mathplotlib/drawing does not have a README file

    CellInfo

    pub struct CellInfo {
    row : Int
    column : Int
    x_range : (Double, Double)
    y_range : (Double, Double)
    } derive(Eq,
    Debug
    )

    Original zero-based matrix indices and the cell's data-space intervals. Intervals retain their source orientation, including reversed extents.

    CellInfo::equal

    fn CellInfo::equal(CellInfo, CellInfo) -> Bool

    CellInfo::not_equal

    fn CellInfo::not_equal(x : CellInfo, y : CellInfo) -> Bool

    CellInfo::to_repr

    Drawing

    pub struct Drawing {
    // private fields
    }

    A prepared SVG snapshot with immutable semantic hit targets and no UI types.

    Drawing::height

    fn Drawing::height(self : Drawing) -> Int

    Drawing::hit_info

    fn Drawing::hit_info(self : Drawing, point : HitPoint) -> HitInfo?

    Look up metadata by exact point equality within this prepared frame.

    Drawing::hit_test

    fn Drawing::hit_test(self : Drawing, x : Double, y : Double, radius? : Double, mode? : HitMode) -> HitPoint?

    Hit-test intrinsic drawing coordinates. Areas win in reverse paint order; point anchors use radius and stable distance ties. XNearest prioritizes nearby non-line points, then selects line samples by screen X inside the panel. Legacy drawings without semantic targets retain nearest-point behavior.

    Drawing::hit_test_client

    fn Drawing::hit_test_client(self : Drawing, client_x : Double, client_y : Double, left : Double, top : Double, width : Double, height : Double, radius? : Double, mode? : HitMode) -> HitPoint?

    Hit-test client coordinates with a radius measured in CSS pixels.

    Drawing::points

    fn Drawing::points(self : Drawing) -> Array[HitPoint]

    Return a copy; mutating it cannot change this drawing's hit targets.

    Drawing::svg

    fn Drawing::svg(self : Drawing) -> String

    Drawing::targets

    fn Drawing::targets(self : Drawing) -> Array[HitTarget]

    Return an independent array; target values contain no mutable collections.

    Drawing::viewport_point

    fn Drawing::viewport_point(self : Drawing, client_x : Double, client_y : Double, left : Double, top : Double, width : Double, height : Double) -> (Double, Double)?

    Convert client coordinates for an SVG viewBox="0 0 width height" with preserveAspectRatio="xMidYMid meet". Outside and letterbox hits are absent. The rectangle must be the actual SVG viewport's client rectangle.

    Drawing::width

    fn Drawing::width(self : Drawing) -> Int

    HitInfo

    pub struct HitInfo {
    point : HitPoint
    kind : HitKind
    series : String
    category : String?
    value : Double
    interval : (Double, Double)?
    fraction : Double?
    cell : CellInfo?
    } derive(Eq,
    Debug
    )

    Semantic values captured with the same immutable frame as its hit point.

    HitInfo::equal

    fn HitInfo::equal(HitInfo, HitInfo) -> Bool

    HitInfo::not_equal

    fn HitInfo::not_equal(x : HitInfo, y : HitInfo) -> Bool

    HitInfo::to_repr

    HitKind

    pub(all) enum HitKind {
    Line
    Scatter
    Bar
    BarH
    Histogram
    Pie
    Heatmap
    } derive(Eq,
    Debug
    )

    The plotted primitive described by a hit target.

    HitKind::equal

    fn HitKind::equal(HitKind, HitKind) -> Bool

    HitKind::not_equal

    fn HitKind::not_equal(x : HitKind, y : HitKind) -> Bool

    HitKind::to_repr

    HitMode

    pub(all) enum HitMode {
    Nearest
    XNearest
    } derive(Eq,
    Debug
    )

    XNearest falls back to a real line sample nearest in screen X inside a panel.

    HitMode::equal

    fn HitMode::equal(HitMode, HitMode) -> Bool

    HitMode::not_equal

    fn HitMode::not_equal(x : HitMode, y : HitMode) -> Bool

    HitMode::to_repr

    HitPoint

    pub struct HitPoint {
    panel_index : Int
    artist_index : Int
    point_index : Int
    data_x : Double
    data_y : Double
    screen_x : Double
    screen_y : Double
    } derive(Eq,
    Debug
    )

    A data-point anchor and its intrinsic drawing coordinates. Indices identify a point within this frame's panel and artist ordering.

    HitPoint::equal

    fn HitPoint::equal(HitPoint, HitPoint) -> Bool

    HitPoint::not_equal

    fn HitPoint::not_equal(x : HitPoint, y : HitPoint) -> Bool

    HitPoint::to_repr

    HitShape

    pub(all) enum HitShape {
    Point
    Rectangle(Double, Double, Double, Double)
    Sector(Double, Double, Double, Double, Double)
    AnnularSector(Double, Double, Double, Double, Double, Double)
    } derive(Eq,
    Debug
    )

    Intrinsic drawing geometry. Rectangles use left, top, width, height. Sectors use center X/Y, radius, start degrees and positive CCW sweep degrees; angles follow mathematical coordinates, with the screen Y direction reversed. Nonpositive sizes/sweeps and nonfinite geometry do not hit; rectangle and sector edges are included, and sweeps of at least 360 degrees are full circles. Annular sectors use center X/Y, inner radius, outer radius, start and sweep. Inner/outer edges are included; a positive inner radius excludes the hole.

    HitShape::equal

    fn HitShape::equal(HitShape, HitShape) -> Bool

    HitShape::not_equal

    fn HitShape::not_equal(x : HitShape, y : HitShape) -> Bool

    HitShape::to_repr

    HitTarget

    pub struct HitTarget {
    info : HitInfo
    shape : HitShape
    bounds : (Double, Double, Double, Double)
    } derive(Eq,
    Debug
    )

    A hit geometry and the displayed panel rectangle that clips it.

    HitTarget::equal

    fn HitTarget::equal(HitTarget, HitTarget) -> Bool

    HitTarget::not_equal

    fn HitTarget::not_equal(x : HitTarget, y : HitTarget) -> Bool

    cell_info

    fn cell_info(row : Int, column : Int, x_range : (Double, Double), y_range : (Double, Double)) -> CellInfo

    drawing

    fn drawing(width : Int, height : Int, svg : String, points : Array[HitPoint], targets? : Array[HitTarget], exclusions? : Array[(Int, (Double, Double, Double, Double))]) -> Drawing

    Capture independent copies of point, semantic-target and exclusion arrays. Exclusions are (panel index, intrinsic left/top/width/height) overlay rectangles.

    hit_info

    fn hit_info(point : HitPoint, kind : HitKind, value~ : Double, series? : String, category? : String?, interval? : (Double, Double)?, fraction? : Double?, cell? : CellInfo?) -> HitInfo

    hit_point

    fn hit_point(panel_index : Int, artist_index : Int, point_index : Int, data_x : Double, data_y : Double, screen_x : Double, screen_y : Double) -> HitPoint

    hit_target

    fn hit_target(info : HitInfo, shape : HitShape, bounds : (Double, Double, Double, Double)) -> HitTarget