Commit Graph
10 Commits
Author SHA1 Message Date
dotCooCoo f9b7c9482e Merge main into feat/circle-tool-options 2026-11-19 05:09:36 -08:00
dotCooCoo e886b7ddfd Shapes: a Circle tool click near the first point leaves no circle shown
A second press within 3 screen points of the first point but not on it,
let go where it was pressed, placed nothing but left the pointer at the
press, so the tool showed a circle about 2 pt across until the pointer
moved. Such a click now puts the pointer back on the first point.
2026-11-18 17:38:54 -08:00
dotCooCoo b66e43f048 Shapes: Circle tool options pass the tool's own option check
The Circle tool now answers Tool::check_option with the values
check_options takes, so tool.setOption and the option check that runs
on every tool accept the options the tool reports.

- With Third Point by Dragging off, a click in reach of both placed
  points is on the nearer one (or the one it snapped to).
- A press on the second point previews the circle on the two points
  that its release draws, and a press on the first point previews none.
- With Anchors at Standard Positions off, the preview is the path with
  an anchor at each point, which the release draws.
- A move of less than 2 screen points keeps the second or third point
  where it was pressed.
- circle_with_anchors_at gives the two ends of a diameter four anchors
  also where rounding of the midpoint puts the second point more than
  half a turn from the first.
- The canvas-edge test checks for an outline whether dashed or solid.
- docs/mcp.md says that only anchors: "standard" draws a live ellipse.
2026-11-18 16:15:07 -08:00
dotCooCoo 6e8a8e8cdb Shapes: a Circle tool release near the press is a click, also after a drag
A press dragged away and let go within 2 screen points of where it was
pressed was still taken as a drag. A second press dragged out and back
drew the circle through three nearly collinear points, or nothing, and a
press on the first point drew a circle about 1 pt across. The release
distance now decides: such a release keeps the press's point, so a second
press draws the circle on the diameter to it, a press on the first point
places nothing, and a first press places the first point. The preview
and the guides of the drag go with it.
2026-11-18 15:18:56 -08:00
dotCooCoo 22d799fd41 Shapes: the Circle tool shows no circle its anchored path cannot draw
With Standard Anchors off, a circle near the canvas edge whose path with
anchors at the points curves past the edge is no longer previewed or
drawn, as shape.circleThroughPoints refuses it.
2026-11-17 18:19:38 -08:00
dotCooCoo 8af2a300e6 Shapes: a Circle tool drag of the second or third point ends where it is let go
With Third Point by Dragging off, a release away from the last drag of
the second or third point now places that point at the release
position.
2026-11-17 17:41:58 -08:00
dotCooCoo ecfe2356cc Merge feat/circle-tool into feat/circle-tool-options 2026-11-17 17:41:58 -08:00
dotCooCoo a5cc189172 Shapes: a Circle tool drag ends where it is let go
A release away from the last drag point now moves the circle's points to
the release position before the circle is drawn, for a drag from the
first press, from a second press and from a press on the first point. A
release within 2 screen points of the press is still a click and keeps
the point of the press.
2026-11-17 17:18:46 -08:00
dotCooCoo 1901799b76 Shapes: Circle Tool Options set what the Circle tool shows and where its anchors go
Double-clicking the Circle tool, or `tool.options {tool: "circle"}`, opens
Circle Tool Options. Show Center, Show Radii and Show Diameter switch the
center cross, the radius lines and the diameter label the tool shows while
a circle is drawn, and Color sets the color of the cross and the lines
(red, blue, magenta, green, black or gray). With Anchors at Standard
Positions off, the circle's anchors are at the points it was drawn
through, plus evenly spaced anchors between them so that no curve turns
more than a quarter of the circle. With Third Point by Dragging off, a
second click places the second point and a third click draws the circle
through the three; a double-click on the second point draws the circle on
the two. Every option is on by default, and the options are kept with the
preferences.

`shape.circleThroughPoints` takes `anchors: "standard"|"points"`.
`tool.setOption` rejects a value the Circle tool's options do not take.
2026-11-17 16:30:02 -08:00
dotCooCoo e6ec393062 Shapes: the Circle tool draws a circle through two or three points
The Circle tool, in the Ellipse tool's flyout, draws a circle with
shape.circleThroughPoints. A drag from one point to another, or a click
on each, draws the circle with the two points as the ends of a diameter.
A click on a first point, then a press on a second point dragged to a
third, draws the circle through the three. Shift keeps the second point
at 45° steps from the first. For a circle on two points, Alt rounds the
diameter to the nearest ruler tick at the current zoom in the General
unit. Each point snaps to Smart Guides. Until the release the tool shows
the circle as a dashed outline (solid once it is more than 50,000 screen
points around), a cross at its center, a line from the center to each
point and, with Measurement Labels on, the diameter by the pointer.
Three different points on one line, or a circle past the canvas, show
"Circle too large" by the pointer instead, and the release draws
nothing. Escape, a dropped press, and an edit, Undo or Redo made outside
the tool drop the first point. A second press within 3 screen points of
the first point, or one that snaps to it, places nothing when let go
there, and draws the circle on the diameter it drags out when dragged.
Each circle is one undo step. The tool's icon is new and drawn for
VectorCraft.

shape.circleThroughPoints also takes two points, or two selected anchor
points, as the ends of a diameter. Its two errors about the number of
points now say "two or three", in every catalog that translates them.

Part of #7178.
2026-11-17 13:29:12 -08:00