|
|
Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
|
Click-to-place path authoring tool. More...
#include "donner/editor/PenTool.h"
Classes | |
| struct | PreviewSegment |
| Preview segment for immediate pen-tool chrome. More... | |
| struct | PreviewHandleLine |
| Preview line connecting an anchor to one of its control handles. More... | |
Public Member Functions | |
| void | onMouseDown (EditorApp &editor, const Vector2d &documentPoint, MouseModifiers modifiers) override |
| Handle a click in document space. | |
| void | onMouseMove (EditorApp &editor, const Vector2d &documentPoint, bool buttonHeld) override |
| Handle pointer movement; currently unused by the prototype. | |
| void | onMouseUp (EditorApp &editor, const Vector2d &documentPoint) override |
| Handle mouse release; currently unused by the prototype. | |
| void | cancel () |
| Cancel the in-progress path without modifying the current document. | |
| bool | isDrafting () const |
| Whether the tool is currently appending to a path. | |
| bool | isDraggingAnchor () const |
| Whether the current mouse drag is shaping the most recently placed anchor. | |
| const std::string & | activePathData () const |
| Current path data for tests and UI diagnostics. | |
| std::vector< PreviewSegment > | previewSegments () const |
| Path preview segments for immediate render-pane chrome. | |
| std::vector< Vector2d > | previewAnchors () const |
| Anchor positions for immediate render-pane chrome. | |
| std::vector< PreviewHandleLine > | previewHandleLines () const |
| Handle guide lines for immediate render-pane chrome. | |
| Public Member Functions inherited from donner::editor::Tool | |
| Tool (const Tool &)=delete | |
| Tool & | operator= (const Tool &)=delete |
| Tool (Tool &&)=delete | |
| Tool & | operator= (Tool &&)=delete |
Click-to-place path authoring tool.
The prototype supports polyline creation, shift-constrained points, continuing a selected open <path>, and closing an active path by clicking near its first point.
| struct donner::editor::PenTool::PreviewSegment |
Preview segment for immediate pen-tool chrome.
| Class Members | ||
|---|---|---|
| Vector2d | control1 = Vector2d::Zero() | |
| Vector2d | control2 = Vector2d::Zero() | |
| bool | cubic = false | |
| Vector2d | end = Vector2d::Zero() | |
| Vector2d | start = Vector2d::Zero() | |
| struct donner::editor::PenTool::PreviewHandleLine |
Preview line connecting an anchor to one of its control handles.
| Class Members | ||
|---|---|---|
| Vector2d | end = Vector2d::Zero() | |
| Vector2d | start = Vector2d::Zero() | |
|
overridevirtual |
Handle a click in document space.
| editor | Editor state and mutation queue. |
| documentPoint | Click location in SVG document coordinates. |
| modifiers | Modifier-key state for the click. |
Implements donner::editor::Tool.
|
overridevirtual |
Handle pointer movement; currently unused by the prototype.
| editor | Editor state and mutation queue. |
| documentPoint | Pointer location in SVG document coordinates. |
| buttonHeld | Whether the left mouse button is down. |
Implements donner::editor::Tool.
|
overridevirtual |
Handle mouse release; currently unused by the prototype.
| editor | Editor state and mutation queue. |
| documentPoint | Release location in SVG document coordinates. |
Implements donner::editor::Tool.