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.
This commit is contained in:
dotCooCoo
2026-11-18 16:15:07 -08:00
parent 4dbbf4ac44
commit b66e43f048
4 changed files with 150 additions and 17 deletions
+3 -2
View File
@@ -6582,8 +6582,9 @@ slider back to the Auto-Smooth level.
## Circle through two or three points
`shape.circleThroughPoints {points?: [[x, y], [x, y]] or [[x, y], [x, y], [x, y]]}` draws the circle whose edge passes
through the points, as a live ellipse with the current paint, and selects it. Two points are the ends of a diameter.
`shape.circleThroughPoints {points?: [[x, y], [x, y]] or [[x, y], [x, y], [x, y]], anchors?}` draws the circle whose
edge passes through the points, with the current paint, and selects it: a live ellipse with the default
`anchors: "standard"`, and a plain path with `anchors: "points"`. Two points are the ends of a diameter.
Without `points`, it uses the two or three selected anchor points, from one path or several: anchor points selected with
Direct Selection, or all the anchor points of a path selected whole, such as a triangle. The ends of selected segments
do not count. The result is `{id, cx, cy, radius}`, and one undo removes the circle. The circle is not pixel-aligned,