Skip to content

Feat/sketchy styles - #12

Merged
imnakul merged 12 commits into
masterfrom
feat/sketchy-styles
Nov 21, 2026
Merged

imnakul merged 12 commits into
masterfrom
feat/sketchy-styles

Conversation

@imnakul

@imnakul imnakul commented Nov 21, 2026

Copy link
Copy Markdown
Owner

This pull request introduces support for advanced line styles and hand-drawn effects in the annotation system, with a focus on frontend-generated geometry for strokes and fills. It also adds validation to ensure safe and consistent rendering, updates the tech stack, and enhances user-facing features and documentation.

Support for advanced annotation styles and geometry:

  • Added a new StrokeGeometry struct to represent precomputed geometry for styled (dashed, dotted, sketchy) and rounded shapes, including support for polylines, dots, and hand-drawn pattern fills. This geometry is now included in relevant annotation types (Line, Arrow, CurvedArrow, Rectangle, Ellipse) and is validated before rendering. [1] [2] [3] [4] [5] [6] [7]
  • The rendering pipeline (render_annotation and helpers) now draws annotations using this geometry if present, supporting fills, patterned fills, strokes, and dots for a wide variety of line and fill styles.

Validation and safety:

  • Implemented geometry validation (validate_scene_geometry) to reject non-finite coordinates, degenerate strokes, and to cap the total number of geometry points, preventing resource exhaustion or malformed input from affecting the exporter. [1] [2]

User-facing features and documentation:

  • Updated the public changelog with new features: customizable toolbar keys, smart select as default, sketchy line styles with adjustable sketch level, hand-drawn fills, and rounded corners for rectangles.
  • Updated the tech stack documentation to include Rough.js for sketchy strokes.
  • Changed the default tool in the toolbar to "Smart select" and updated related tests.

Dependencies:

  • Added roughjs as a dependency in the desktop app to support frontend generation of sketchy and hand-drawn effects.

Testing:

  • Added comprehensive tests for geometry rendering, validation, and backward compatibility with old annotation formats.

imnakul and others added 12 commits November 20, 2026 19:57
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Neat, Loose and Wild Rough.js levels, per-annotation and in Screen Draw.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Hatching, cross-hatch, zigzag and dots for rectangles and ellipses in the
capture canvas, the PNG export and Screen Draw.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…lect outline

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
snaphub Ready Ready Preview Nov 21, 2026 8:29am UTC

@imnakul
imnakul merged commit ff5d8b4 into master Nov 21, 2026
3 checks passed
@imnakul
imnakul deleted the feat/sketchy-styles branch November 26, 2026 06:40

This branch was successfully deployed

1 active deployment
Preview — d8d5a7d1 Deployed Nov 20, 2026 by vercel[bot]
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