Commit Graph
65 Commits
Author SHA1 Message Date
.CooCoo 66b8c8ba3e Object styles: checks and fixes for corners, strokes and the style dialog (#2721)
- Corner options use path order for a path with more than one subpath, so
  a second rectangle no longer takes the first one's corner order.
- IDML export writes EnableStrokeAndCornerOptions="false" for a style
  without corners, so it does not take corners from its based-on style on
  import.
- style.object.create and style.object.edit refuse a stroke gap tint
  outside 0 to 1 and a stroke type field that its kind does not take, as
  object.stroke does. An edit that changes nothing returns restyled: 0.
- New Object Style and Object Style Options read a bare number in the
  document's ruler unit, keep a Text Frame General measurement that was
  not edited at its exact value, and New Object Style refuses a name
  another style has.
- Clear Overrides in the Object Styles panel is enabled when any selected
  object differs from its style.
2026-11-12 17:25:39 -05:00
dotCooCoo 630c2e2bba Merge #1520 (object-style-paragraph-styles) onto main 2026-11-11 20:24:48 -08:00
Dylan M. Taylorandaiongg dc9eea2695 Small bounds: outline simplification, table row insertion, note ids, xtask stats (#2232)
* fix: iterative outline simplification, bulk row insertion, linear note ids, no symlink walking in xtask stats

* Apply review fixes

- crates/doc/src/tests.rs
- crates/geom/src/trace.rs

* Apply review fixes

- crates/geom/src/trace.rs

* address review: cover a maximal note id in tests, format trace test

---------

Co-authored-by: aiongg <67543387+aiongg@users.noreply.github.com>
2026-11-11 16:20:58 -05:00
Dylan M. Taylorandautocraft-bot[bot] 79d7a912f1 Strokes: cap the points a wavy or hashed stroke places along a path (#2188)
* Strokes: cap the points a wavy or hashed stroke places along a path

* address review: zero-length quadratic contributes no length in stroke samples

* Fix failing CI check

- crates/geom/src/stroke_style.rs

* Fix failing CI check

- crates/geom/src/stroke_style.rs

---------

Co-authored-by: autocraft-bot[bot] <354215646+autocraft-bot[bot]@users.noreply.github.com>
2026-11-11 16:17:18 -05:00
Dylan M. Taylor a337204cfe Geom: step budget in Pencil fit, stripe band cap, balanced Pathfinder union (#2251)
* geom: step budget in freehand fit, stripe band cap, balanced unions

* move test
2026-11-08 22:56:03 +00:00
NetterSilverandClaude Haiku 5.5 2fb2689efe Normalize marquee rect in hit::intersects_rect
Found while testing crates/geom/src/hit.rs:28-35 (intersects_rect: `path.anchors().any(|(_, _, a)| r.contains(a.p))` and the early-out using `b.intersect(r)`)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 11:14:34 +01:00
Mex b98687c3e1 M5: keep out-and-back cubic segments in striped strokes (#2323)
* M5: preserve out-and-back cubics in striped strokes

A cubic can travel out and back when its endpoints and first control point coincide. Include the second control point in the zero-length guard and cover its offset extent and both stripe bands.

* M5: record striped cubic regression coverage

Record the scoped cubic stroke correction without changing readiness estimates or other progress entries.
2026-11-04 15:36:05 -05:00
moppeeer 2f2c319f47 Merge remote-tracking branch 'origin/main' into object-style-paragraph-styles
# Conflicts:
#	ROADMAP.md
#	crates/engine/src/tests.rs
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/i18n/ar.rs
#	crates/ui-egui/src/i18n/cs.rs
#	crates/ui-egui/src/i18n/de.rs
#	crates/ui-egui/src/i18n/it.rs
#	crates/ui-egui/src/i18n/ja.rs
#	crates/ui-egui/src/i18n/ka.rs
#	crates/ui-egui/src/i18n/pl.rs
#	crates/ui-egui/src/i18n/pt_br.rs
#	crates/ui-egui/src/i18n/ru.rs
#	crates/ui-egui/src/i18n/table.rs
#	crates/ui-egui/src/i18n/uk.rs
#	crates/ui-egui/src/lib.rs
#	crates/ui-egui/src/menus/ui_commands.rs
2026-11-04 19:04:51 +01:00
KnottyDyesandClaude Opus 5.5 5e8571d11e Geom: test that stray end handles leave a line without area
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 18:58:37 -07:00
aiongg c05afc6b44 Apply review fixes
- crates/geom/src/path.rs
2026-11-04 01:54:40 +00:00
KnottyDyesandClaude Opus 5.5 5bd8ada171 Place: lines don't become frames when content is placed
Placing an image or media with no placement parameters used the selected
item as the frame, and so did a click of the loaded place cursor. On a
line that made a zero-height frame that kept its stroke. All three now
skip items that enclose no area (PathData::encloses_area): lines and
paths whose points all lie on one line get a new frame instead. Frames,
and open paths that enclose an area, take the content as before.

An explicit frame, x, y, spread or width behave as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 17:52:04 -07:00
Brandon Thomas 7526fe2d43 Merge pull request #1993 from Silvertree2010/fix/h3886-striped-and-wavy-strokes-draw-a
Keep stroke styles from joining the subpaths of a compound path
2026-11-02 23:24:17 -05:00
NetterSilverandClaude Haiku 5.5 c065cec517 Include single-anchor subpaths in PathData::bounds
Found while testing crates/geom/src/path.rs:~335 (PathData::bounds)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 13:43:09 +01:00
Brandon Thomas c091733eef Merge pull request #2076 from Silvertree2010/fix/h4302-hit-intersects-rect-misses-a-sha
Fix intersects_rect missing hits for zero-width/height marquee rects
2026-11-01 14:49:23 -05:00
NetterSilverandClaude Haiku 5.5 3871100e3f Fix zero tangent angle in Type on a Path at collapsed handles
Found while testing crates/geom/src/warp.rs:~44-52 (PathWarp::at)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 10:30:41 +01:00
NetterSilverandClaude Haiku 5.5 aa449aa358 Fix intersects_rect missing hits for zero-width/height marquee rects
Found while testing crates/geom/src/hit.rs:32-35 (intersects_rect early-out)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 06:47:04 +01:00
aiongg 268de9f55c Merge PR #1409: Units: centimetres show four decimals 2026-10-30 19:44:36 +00:00
moppeeer 9d0bdc21ad Merge remote-tracking branch 'origin/main' into object-style-paragraph-styles
# Conflicts:
#	crates/doc/src/item.rs
#	crates/engine/src/cmd/style.rs
#	crates/idml/src/export.rs
#	crates/idml/src/import.rs
#	crates/ui-egui/src/i18n.rs
#	crates/ui-egui/src/menus.rs
2026-10-29 12:12:31 +01:00
NetterSilverandClaude Opus 5.5 4d88c0899e Keep stroke styles from joining the subpaths of a compound path
Found while testing crates/geom/src/stroke_style.rs:24-31 (offset_path: `(MoveTo(p), 0, true) => out.line_to(p)`; also samples/wavy at :58-98)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 09:21:20 +01:00
moppeeer 0f626eaaa4 Merge remote-tracking branch 'origin/main' into object-style-paragraph-styles
# Conflicts:
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/lib.rs
2026-10-25 17:04:56 +01:00
NetterSilverandClaude Haiku 5.5 58060a5804 Fix ruler major tick spacing skipping the 10x step
Found while testing crates/geom/src/units.rs:~147 (Unit::ruler_ticks, the `while major * zoom < 50.0` loop)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 07:04:03 +01:00
Brandon Thomas 6cf71e33e3 Merge pull request #1699 from Silvertree2010/fix/h1863-from-bezpath-loses-smooth-anchor
Detect smooth anchors on all open subpaths in from_bezpath
2026-10-24 10:22:28 -04:00
moppeeer 4b3b6d0cf0 Merge remote-tracking branch 'origin/main' into centimeters-four-decimals
# Conflicts:
#	crates/geom/src/units.rs
2026-10-24 11:21:21 +02:00
moppeeer def888b6d8 Merge remote-tracking branch 'origin/main' into object-style-paragraph-styles
# Conflicts:
#	crates/engine/src/tests.rs
2026-10-24 11:18:20 +02:00
Dylan M. TaylorandClaude Sonnet 5.5 cb763c2583 refactor: split complex functions in psd, table, parabox, index, trace, pdf export, render (Sonar S3776) (#1724)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 04:51:26 -04:00
Dylan M. TaylorandClaude Sonnet 5.5 8299d26400 chore: replace trivial closures with method paths (Sonar S1612) (#1714)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 04:30:43 -04:00
NetterSilverandClaude Haiku 5.5 7c3e8a9dc7 Detect smooth anchors on all open subpaths in from_bezpath
Found while testing crates/geom/src/path.rs:284-288 (MoveTo branch of PathData::from_bezpath)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 02:24:59 +00:00
moppeeerandClaude Opus 5.5 c22c48dc8e Object styles hold named corners; IDML styles inherit the corners they don't set
An object style's corners are top left, top right, bottom right and bottom
left, as InDesign's and as IDML import and export already read them.
`corners::named_slots` finds which anchor of a path is at which corner, and
`CornerOptions::named_to_path` / `path_to_named` convert: applying a style
puts each corner on the anchor at that corner, whatever order the path runs
in; a style made from a selection, and redefining one, convert the item's
corners. IDML export's `corner_names` uses the same mapping.

An IDML object style that sets some corners takes the others from its
Based On chain, so applying a child that changes one corner keeps the
parent's other corners.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 10:24:19 +02:00
paaspaas00andClaude Opus 5.5 9892ae0560 Docs: format_measure's precision per unit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:00:18 +02:00
moppeeerandClaude Opus 5.5 39dfbdb36b Units: centimetres show four decimals, as InDesign's fields do
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:55:08 +02:00
NetterSilverandClaude Haiku 5.5 9887272efb Fix "-0p0" for tiny negative pica/cicero values
Found while testing crates/geom/src/units.rs:276

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 12:39:05 +00:00
aiongg 7747b0d396 Merge PR #1073: Units: inches show four decimals, as InDesign's fields (0.1667 in, 8.2677 in) 2026-10-16 03:53:24 +00:00
moppeeerandClaude Opus 5.5 a8388df9e8 Units: inches show four decimals, as InDesign's fields
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:51:56 +02:00
Brandon Thomas cccd1852a9 Merge PR #308 2026-10-15 00:35:27 -04:00
Brandon Thomas d2e40f6b6f Merge PR #306 2026-10-15 00:35:27 -04:00
Brandon Thomas 41c1cd3c5d Merge PR #820 2026-10-14 22:05:12 -04:00
0f4f382b0e feat(text): improve editing, snapping, and threading
Add multi-click text selection, pending caret formatting and clipboard support, text-aware colour controls, guide/grid snapping, and frame threading with loaded-port interactions.

Include the layout, drop-cap and IDML updates carried from #83, with safeguards for generated and linked stories, external text references, local IDs, locked frames and atomic colour edits.

Fixes #23.

Co-authored-by: Sean Hammond <sean.hammond@und.edu>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 21:41:46 -06:00
aiongg 71fecf8ad5 Merge #820: fix(geom): decompose of a flattened transform reports 0 shear instead of NaN 2026-10-13 19:04:34 +00:00
Saad Abdullah 3c070a8cdd fix(geom): decompose of a flattened transform reports 0 shear instead of NaN 2026-10-13 16:49:51 +00:00
Brandon Thomas a390905beb Merge branch 'pr/647' into batch1
# Conflicts:
#	crates/tools/src/lib.rs
#	crates/tools/src/tests.rs
#	crates/ui-egui/src/canvas.rs
2026-10-13 02:23:33 -04:00
aiongg 6b2e319f96 Integration (#636): bracket clamps can't panic on a NaN path length 2026-10-13 01:02:40 +00:00
aiongg 99e6922981 Merge pr/636: Tools: drag type-on-a-path start and end brackets (#636)
# Conflicts:
#	ROADMAP.md
#	crates/idml/src/tests.rs
#	crates/tools/src/lib.rs
#	crates/tools/src/select.rs
#	crates/tools/src/tests.rs
#	crates/ui-egui/src/canvas.rs
2026-10-13 00:08:12 +00:00
moppeeerandClaude Opus 5.5 cded7d997e feat(tools): Drag type-on-a-path start and end brackets
Selected type on a path shows its start and end brackets across the path,
as in InDesign, and the Selection and Direct Selection tools drag them
along it (Move Bracket, one undo step): the text starts and ends where
they are, and text past the end bracket is overset.

- doc: PathType.end (None: the path's end)
- geom: PathWarp::nearest, the arc length of the nearest point
- engine: type.pathOptions {end}; brackets stay on the path and can't cross
- compose: the line runs from the start to the end bracket
- idml: EndBracket read and written
- tools: Cursor::PathBracket

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 22:32:56 +02:00
moppeeerandClaude Opus 5.5 5eda7cebbc fix(geom): Trim straight sides exactly for Corner Options
Straight sides were trimmed through inv_arclen at 1e-3 accuracy, so a
rectangle's corner points landed up to about 1e-4 pt off. Lines are now
measured and trimmed along the chord, exactly; curves still use arc length.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:29:13 +02:00
moppeeerandClaude Opus 5.5 a175245f95 fix(geom): Corner Options keep curves and round every corner point
Corners were applied only where two straight segments meet, and every
other segment was redrawn as a straight line: a Pathfinder quarter
circle with rounded corners rendered as a triangle with one round
corner. Corner points are now where the path turns; the sides next to a
corner are trimmed along their length, curves included, and stay
curves. Smooth points are left alone; rectangles are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:29:13 +02:00
aiongg 059f9a40ef Merge #519: Corner Options keep curves and round every corner point
Conflict: ROADMAP.md: both progress-log lines
Conflict: crates/geom/src/corners.rs: tests keep next's radius_is_clamped_to_half_the_shorter_side and box_outline_rounds_only_closed_corners plus the PR's nearest, quarter_disc and three tests
2026-10-12 00:12:34 +00:00
moppeeerandClaude Opus 5.5 c6d2856688 fix(geom): Trim straight sides exactly for Corner Options
Straight sides were trimmed through inv_arclen at 1e-3 accuracy, so a
rectangle's corner points landed up to about 1e-4 pt off. Lines are now
measured and trimmed along the chord, exactly; curves still use arc length.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 23:57:34 +02:00
moppeeerandClaude Opus 5.5 f8ab5b2c61 fix(geom): Corner Options keep curves and round every corner point
Corners were applied only where two straight segments meet, and every
other segment was redrawn as a straight line: a Pathfinder quarter
circle with rounded corners rendered as a triangle with one round
corner. Corner points are now where the path turns; the sides next to a
corner are trimmed along their length, curves included, and stay
curves. Smooth points are left alone; rectangles are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:00:52 +02:00
aiongg 0ebe1212f0 Merge feat/paragraph-settings-full: paragraph borders, shading, span space and list levels in the model, layout, IDML and dialogs
Conflict: crates/compose/src/lib.rs: imports from both (ListAlign, ListCounter; ParaBox beside next's hit_note_with); the branch's list labels (ListCounter, named_labels, label_chars, label alignment, Tab Position stop) with next's list_label marking from prepend_label's count; the branch's align_label before next's warichu placement, trimmed spaces and drop cap; next's rule_color for rules above and below in the branch's Deco literals; the branch's split block end (ends_split, span space after) in place of next's two identical copies; next's drop cap helpers, then the branch's label_chars and align_label, then prepend_label
Conflict: crates/compose/src/tests.rs: both sides' tests
Conflict: crates/idml/src/export.rs: next's para_attrs parent name argument with the branch's with_list_tab (its parent attributes renamed parent_props) for styles and paragraph ranges
Conflict: crates/idml/src/import.rs: next's INDESIGN_CORNER_SIZE and tint doc; the branch's corners() placed before tint's doc comment
Conflict: crates/idml/src/tests.rs: both sides' tests
Conflict: crates/ui-egui/src/dialogs.rs: next's deleteParagraphStyle and the branch's paragraphLocal confirm arms
Conflict: crates/ui-egui/src/panels/glyphs.rs: the branch's grid() split, with next's scroll bar room in its column count
2026-10-10 16:26:10 +00:00
aiongg 8f93548572 Paragraph borders, shading, span space and list levels: model, layout and IDML
Borders gain a stroke type (built-in or a document stroke style), cap,
join, gap colour and tint, a shape and size per corner, column or text
width, top and bottom edges, closed boxes in each part of a split
paragraph, and one box for consecutive paragraphs with the same
settings. Shading gains the same corners, edges and width, Clip to
Frame, and Do not Print or Export. Boxes are drawn once the lines are in
place, as filled paths where they aren't plain rectangles.

Span and split paragraphs keep at least their space before and after
from the column text. Lists have levels that number on their own and
restart after a higher level, ^1 to ^9 in the number text, a character
style for the label, a bullet font, left, centre or right alignment at
the line start, and a tab position for the text after the label.

All attributes load from older files with their defaults and
round-trip through IDML, apart from the tab position.
2026-10-10 16:03:11 +00:00