Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofmodule widget.module·originates fromworld 07158574-5…

_markers

Marker-shape canvas command generators used by `Z.plot.points`. Mirrors the marker shapes that the deleted `egui_plot::MarkerShape` enum exposed: `circle`, `square`, `diamond`, `cross`, `plus`, `up`, `down`, `left`, `right`, `asterisk`. Unknown shapes fall back to circle with a c…

byzero-proxy @ DESKTOP-DB3UJOJ·posted 2mo ago
What it does

_markers

Marker-shape canvas command generators used by Z.plot.points. Mirrors the marker shapes that the deleted egui_plot::MarkerShape enum exposed: circle, square, diamond, cross, plus, up, down, left, right, asterisk. Unknown shapes fall back to circle with a console warning (parity with the deleted Rust path).

Exports

  • M.commands(shape: MarkerShape, cx: number, cy: number, radius: number, opts: MarkerOpts?) -> { CanvasCommand } — list of canvas commands rendering the marker.

Types:

  • MarkerShape = "circle" | "square" | "diamond" | "cross" | "plus" | "up" | "down" | "left" | "right" | "asterisk" | string — string fallthrough warns and falls back to circle.
  • MarkerOpts = { fill: string?, stroke: string?, strokeWidth: number? }
  • CanvasCommand = { [string]: any } — opaque canvas-renderer command.

Usage

local Markers = require("@builtin::modules.zui.widget._markers")

local cmds = Markers.commands("diamond", 50, 50, 4, { fill = "#fff" })
-- cmds is a list of canvas commands ready to splice into a canvas.

Notes

  • Each shape returns one or more canvas commands centered at (cx, cy) with bounding-circle radius radius.
  • cross, plus, asterisk, up/down/left/right are stroke-based and fall back to opts.fill (or "#FFFFFF") for the line color when no stroke is supplied.
  • Unknown shapes warn via log.warn (when available) and fall back to the circle marker — parity with the deleted Rust enum's default arm.
  • Pure module — no engine state, no state owned here. Safe to call from any context.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

ZuiMarkers Module Marker-shape canvas command generators used by `Z.plot.points`. Mirrors the marker shapes that the deleted `egui_plot::MarkerShape` enum exposed: circle, square, diamond, cross, plus, up, down, left, right, asterisk. Unknown shapes fall back to circle with a console warning (parity with the deleted Rust path). Each shape function returns a list of canvas commands centered at `cx, cy` with size `radius` (the marker's bounding-circle radius). Commands carry the caller's `fill` / `stroke` / `strokeWidth`. Consumers: local Markers = require("modules.deprecated.zui.widget._markers") Markers.commands("diamond", 50, 50, 4, { fill = "#fff" })

circle(cx: number, cy: number, r: number, opts: MarkerOpts) → CanvasCommand

Internal: filled / stroked circle command.

argtypedescription
cxnumber
cynumber
rnumber
optsMarkerOpts

rect(x0: number, y0: number, x1: number, y1: number, opts: MarkerOpts) → CanvasCommand

Internal: filled / stroked axis-aligned rect command.

argtypedescription
x0number
y0number
x1number
y1number
optsMarkerOpts

line(ax: number, ay: number, bx: number, by: number, opts: MarkerOpts) → CanvasCommand

Internal: stroked line command. Falls back to `fill` / `"#FFFFFF"` for color so plain lines render even when only `fill` was supplied.

argtypedescription
axnumber
aynumber
bxnumber
bynumber
optsMarkerOpts

circle(cx: ?, cy: ?, r: ?, opts: ?) → void

argtypedescription
cx?
cy?
r?
opts?

square(cx: ?, cy: ?, r: ?, opts: ?) → void

argtypedescription
cx?
cy?
r?
opts?

diamond(cx: ?, cy: ?, r: ?, opts: ?) → void

argtypedescription
cx?
cy?
r?
opts?

cross(cx: ?, cy: ?, r: ?, opts: ?) → void

argtypedescription
cx?
cy?
r?
opts?

plus(cx: ?, cy: ?, r: ?, opts: ?) → void

argtypedescription
cx?
cy?
r?
opts?

up(cx: ?, cy: ?, r: ?, opts: ?) → void

argtypedescription
cx?
cy?
r?
opts?

down(cx: ?, cy: ?, r: ?, opts: ?) → void

argtypedescription
cx?
cy?
r?
opts?

left(cx: ?, cy: ?, r: ?, opts: ?) → void

argtypedescription
cx?
cy?
r?
opts?

right(cx: ?, cy: ?, r: ?, opts: ?) → void

argtypedescription
cx?
cy?
r?
opts?

asterisk(cx: ?, cy: ?, r: ?, opts: ?) → void

argtypedescription
cx?
cy?
r?
opts?

commands(shape: MarkerShape, cx: number, cy: number, radius: number, opts: MarkerOpts?) →

Returns the canvas commands for marker `shape` centered at `(cx, cy)` with size `radius`. Unknown shapes warn and fall back to circle (parity with the deleted Rust path).

argtypedescription
shapeMarkerShapeOne of `circle`, `square`, `diamond`, `cross`, `plus`, `up`, `down`, `left`, `right`, `asterisk`. Unknown shapes fall back to circle.
cxnumberCenter X in canvas-local pixels.
cynumberCenter Y in canvas-local pixels.
radiusnumberBounding-circle radius in pixels.
optsMarkerOpts?`{ fill, stroke, strokeWidth }`. Optional — empty by default.

examples

local cmds = Markers.commands("diamond", 50, 50, 4, { fill = "#fff" })
⌬ Types
MarkerOpts = { fill: string?, stroke: string?, strokeWidth: number? }CanvasCommand = { [string]: any }MarkerShape = "circle" | "square" | "diamond" | "cross" | "plus" | "up" | "down" | "left" | "right" | "asterisk" | string

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

3items
·
other · born here
▤file
▲ 0↑ born
backing path · modules/deprecated/zui.module/widget.module/_markers.module

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.