Inkscape
Vector Graphics Editor
|
TODO: insert short description here. More...
Go to the source code of this file.
Functions | |
bool | directedEulerian (Shape const *s) |
A directed graph is Eulerian iff every vertex has equal indegree and outdegree. | |
double | distance (Shape const *s, Geom::Point const &p) |
bool | distanceLessThanOrEqual (Shape const *s, Geom::Point const &p, double const max_l2) |
Returns true iff the L2 distance from thePt to this shape is <= max_l2. | |
TODO: insert short description here.
Definition in file Shape.cpp.
bool directedEulerian | ( | Shape const * | s | ) |
A directed graph is Eulerian iff every vertex has equal indegree and outdegree.
Is the graph Eulerian?
http://mathworld.wolfram.com/EulerianGraph.html
s | Directed shape. |
Definition at line 2117 of file Shape.cpp.
References Shape::dg_point::dI, Shape::dg_point::dO, Shape::getPoint(), and Shape::numberOfPoints().
Referenced by Shape::Booleen(), Shape::ConvertToShape(), and Shape::Reoriente().
double distance | ( | Shape const * | s, |
Geom::Point const & | p | ||
) |
s | Shape. |
p | Point. |
Definition at line 2136 of file Shape.cpp.
References Geom::cross(), Geom::dot(), Shape::dg_arete::en, Shape::getEdge(), Shape::getPoint(), Shape::hasPoints(), Shape::numberOfEdges(), Shape::numberOfPoints(), offset, Shape::dg_arete::st, and Shape::dg_point::x.
Referenced by Inkscape::UI::Tools::PencilTool::_addFreehandPoint(), Inkscape::CanvasItemGridXY::_render(), GrDrag::addStopNearPoint(), Inkscape::compute_distance(), ControlPolygonFlatEnough(), Inkscape::Display::SnapIndicator::make_alignment_indicator(), Inkscape::Display::SnapIndicator::make_distribution_indicators(), Inkscape::UI::Widget::InkSpinButton::on_drag_update_value(), Inkscape::UI::Widget::InkSpinButton::set_drag_sensitivity(), and Inkscape::UI::Tools::tweak_colors_in_gradient().
bool distanceLessThanOrEqual | ( | Shape const * | s, |
Geom::Point const & | p, | ||
double const | max_l2 | ||
) |
Returns true iff the L2 distance from thePt to this shape is <= max_l2.
Distance = the min of distance to its points and distance to its edges. Points without edges are considered, which is maybe unwanted...
This is largely similar to distance().
s | Shape. |
p | Point. |
max_l2 | L2 distance. |
Definition at line 2198 of file Shape.cpp.
References Geom::cross(), Geom::dot(), Shape::dg_arete::en, Shape::getEdge(), Shape::getPoint(), Shape::hasPoints(), Geom::L1(), Geom::L2(), Shape::numberOfEdges(), Shape::numberOfPoints(), offset, Shape::dg_arete::st, and Shape::dg_point::x.