Inkscape
Vector Graphics Editor
|
TODO: insert short description here. More...
Go to the source code of this file.
Classes | |
class | Shape |
A class to store/manipulate directed graphs. More... | |
struct | Shape::back_data |
A structure to store back data for an edge. More... | |
struct | Shape::sTreeChange |
A structure that represents a change that took place in the sweepline. More... | |
struct | Shape::incidenceData |
struct | Shape::dg_point |
A point or vertex in the directed graph. More... | |
struct | Shape::dg_arete |
An edge in the directed graph. More... | |
struct | Shape::edge_data |
Extra data that some algorithms use. More... | |
struct | Shape::sweep_src_data |
struct | Shape::sweep_dest_data |
struct | Shape::raster_data |
struct | Shape::point_data |
Extra data for points used at various occasions. More... | |
struct | Shape::edge_list |
A structure to help with sorting edges around a point. More... | |
Enumerations | |
enum | { tweak_mode_grow , tweak_mode_push , tweak_mode_repel , tweak_mode_roughen } |
enum | { shape_graph = 0 , shape_polygon = 1 } |
Functions | |
bool | directedEulerian (Shape const *s) |
Is the graph Eulerian? | |
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.h.
anonymous enum |
bool directedEulerian | ( | Shape const * | s | ) |
Is the graph Eulerian?
A directed graph is Eulerian if every vertex has equal indegree and outdegree. http://mathworld.wolfram.com/EulerianGraph.html
s | Pointer to the shape object. |
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.