Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
SPDrawAnchor Class Reference

The drawing anchor. More...

#include <draw-anchor.h>

Public Member Functions

 SPDrawAnchor (Inkscape::UI::Tools::FreehandBase *dc, std::shared_ptr< Geom::PathVector > curve, bool start, Geom::Point delta)
 Creates an anchor object and initializes it.
 
 ~SPDrawAnchor ()
 
SPDrawAnchoranchorTest (Geom::Point w, bool activate)
 Test if point is near anchor, if so fill anchor on canvas and return pointer to it or NULL.
 

Public Attributes

Inkscape::UI::Tools::FreehandBasedc
 
std::shared_ptr< Geom::PathVectorcurve
 
bool start: 1
 
bool active: 1
 
Geom::Point dp
 
CanvasItemPtr< Inkscape::CanvasItemCtrlctrl
 

Detailed Description

The drawing anchor.

Todo:
Make this a regular knot, this will allow setting statusbar tips.

Definition at line 39 of file draw-anchor.h.

Constructor & Destructor Documentation

◆ SPDrawAnchor()

SPDrawAnchor::SPDrawAnchor ( Inkscape::UI::Tools::FreehandBase dc,
std::shared_ptr< Geom::PathVector curve,
bool  start,
Geom::Point  delta 
)

Creates an anchor object and initializes it.

Definition at line 27 of file draw-anchor.cpp.

References ctrl, and delta.

◆ ~SPDrawAnchor()

SPDrawAnchor::~SPDrawAnchor ( )
default

Member Function Documentation

◆ anchorTest()

SPDrawAnchor * SPDrawAnchor::anchorTest ( Geom::Point  w,
bool  activate 
)

Test if point is near anchor, if so fill anchor on canvas and return pointer to it or NULL.

Definition at line 47 of file draw-anchor.cpp.

References activate(), active, ctrl, Inkscape::LARGE, Inkscape::NORMAL, and w.

Member Data Documentation

◆ active

bool SPDrawAnchor::active

Definition at line 45 of file draw-anchor.h.

Referenced by anchorTest().

◆ ctrl

Definition at line 47 of file draw-anchor.h.

Referenced by anchorTest(), and SPDrawAnchor().

◆ curve

◆ dc

Definition at line 42 of file draw-anchor.h.

◆ dp

◆ start


The documentation for this class was generated from the following files: