|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
Release-quality path authoring tool. PenTool creates source-backed <path> elements from document-space clicks: a plain click places a line anchor (M/L), a click-drag places a smooth Bezier anchor (C) whose outgoing handle follows the mouse while the incoming handle mirrors it through the anchor, and Alt/Option during the drag breaks that symmetry to author a corner with mismatched handles. Shift constrains the next anchor to 0/45/90 degrees from the previous one, clicking near the first anchor closes the contour with Z (dragging on close shapes the closing anchor's handles), and the whole pen session collapses into a single undoable command on finalize (close, Enter/double-click or Escape commit, or a tool switch). More...
#include <cstddef>#include <cstdint>#include <optional>#include <string>#include <vector>#include "donner/base/Path.h"#include "donner/base/Vector2.h"#include "donner/editor/Tool.h"#include "donner/svg/SVGPathElement.h"Classes | |
| class | donner::editor::PenTool |
| Click-to-place path authoring tool with direct point editing. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Enumerations | |
| enum class | donner::editor::PenHoverIntent : std::uint8_t { PlaceAnchor , ClosePath , DragAnchor , InsertAnchor } |
| What a pen-tool click at the hovered point would do. Drives the contextual pointer cursor so the user can tell "this click edits the path I am pointing
at" from "this click adds a point". More... | |
Release-quality path authoring tool. PenTool creates source-backed <path> elements from document-space clicks: a plain click places a line anchor (M/L), a click-drag places a smooth Bezier anchor (C) whose outgoing handle follows the mouse while the incoming handle mirrors it through the anchor, and Alt/Option during the drag breaks that symmetry to author a corner with mismatched handles. Shift constrains the next anchor to 0/45/90 degrees from the previous one, clicking near the first anchor closes the contour with Z (dragging on close shapes the closing anchor's handles), and the whole pen session collapses into a single undoable command on finalize (close, Enter/double-click or Escape commit, or a tool switch).
|
strong |
What a pen-tool click at the hovered point would do. Drives the contextual pointer cursor so the user can tell "this click edits the path I am pointing at" from "this click adds a point".