Skip to content

Add Processing-style showcase example#2

Merged
jserv merged 1 commit into
mainfrom
add-processing
Jun 1, 2026
Merged

Add Processing-style showcase example#2
jserv merged 1 commit into
mainfrom
add-processing

Conversation

@jserv
Copy link
Copy Markdown
Contributor

@jserv jserv commented Jun 1, 2026

Standalone single-runner Xlib client with clickable tabs cycling through primitives, analog clock, Bezier curves, fractal tree, and waves scenes. Drives XFillPolygon, XDrawLines, XFillArc, XDrawString, pointer/key input, and timed redraws against the libX11-compat SDL2 backend.

Promote XFillPolygon from a WARN_UNIMPLEMENTED stub to a scanline-fill implementation so the primitives and tree scenes render. Validates the Complex/Nonconvex/Convex shape and CoordModeOrigin/CoordModePrevious mode arguments, supports both EvenOdd and Winding fill rules, and honors the active GC clip stack.


Summary by cubic

Adds a tabbed Processing-style showcase example and implements a scanline XFillPolygon so polygon scenes render correctly with clipping, fill rules, and GXinvert.

  • New Features
    • processing example: single-runner with tabs (primitives, clock, Bezier, tree, waves). Uses pointer/key input (Esc/q, 1–5) and timed redraws. Exercises XFillPolygon, XDrawLines, XFillArc, and XDrawString. Added to build and docs.
    • XFillPolygon: scanline fill with validation of shape (Complex/Nonconvex/Convex) and coord modes (Origin/Previous), supports EvenOdd and Winding, honors the GC clip stack, and handles FillSolid (including GXinvert span inversion) and FillOpaqueStippled.
    • Rendering: extracted rect-inversion helper used by XFillRectangles and polygon spans to implement GXinvert.

Written for commit d1e19e3. Summary will update on new commits.

Review in cubic

cubic-dev-ai[bot]

This comment was marked as resolved.

This provides a standalone single-runner Xlib client with clickable tabs
cycling through primitives, analog clock, Bezier curves, fractal tree,
and waves scenes. Drives XFillPolygon, XDrawLines, XFillArc, XDrawString,
pointer/key input, and timed redraws against the libX11-compat.

Promote XFillPolygon from a WARN_UNIMPLEMENTED stub to a scanline-fill
implementation so the primitives and tree scenes render. Validates the
Complex/Nonconvex/Convex shape and CoordModeOrigin/CoordModePrevious
mode arguments, supports both EvenOdd and Winding fill rules, and
honors the active GC clip stack.
@jserv jserv force-pushed the add-processing branch from 6f34f53 to d1e19e3 Compare June 1, 2026 18:36
@jserv jserv merged commit 566b657 into main Jun 1, 2026
3 checks passed
@jserv jserv deleted the add-processing branch June 1, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant