Inkscape
Vector Graphics Editor
|
Go to the source code of this file.
Functions | |
static void | cubic_bbox (Geom::Coord x000, Geom::Coord y000, Geom::Coord x001, Geom::Coord y001, Geom::Coord x011, Geom::Coord y011, Geom::Coord x111, Geom::Coord y111, Geom::Rect &bbox) |
Geom::OptRect | bounds_fast_transformed (Geom::PathVector const &pv, Geom::Affine const &t) |
Geom::OptRect | bounds_exact_transformed (Geom::PathVector const &pv, Geom::Affine const &t) |
bool | pathv_similar (Geom::PathVector const &apv, Geom::PathVector const &bpv, double precision) |
Geom::OptRect | check_simple_rect (Geom::PathVector const &pathv, double precision) |
static void | geom_line_wind_distance (Geom::Coord x0, Geom::Coord y0, Geom::Coord x1, Geom::Coord y1, Geom::Point const &pt, int *wind, Geom::Coord *best) |
static void | geom_cubic_bbox_wind_distance (Geom::Coord x000, Geom::Coord y000, Geom::Coord x001, Geom::Coord y001, Geom::Coord x011, Geom::Coord y011, Geom::Coord x111, Geom::Coord y111, Geom::Point const &pt, Geom::Rect *bbox, int *wind, Geom::Coord *best, Geom::Coord tolerance) |
static void | geom_curve_bbox_wind_distance (Geom::Curve const &c, Geom::Affine const &m, Geom::Point const &pt, Geom::Rect *bbox, int *wind, Geom::Coord *dist, Geom::Coord tolerance, Geom::Rect const *viewbox, Geom::Point &p0) |
bool | pointInTriangle (Geom::Point const &p, Geom::Point const &p1, Geom::Point const &p2, Geom::Point const &p3) |
void | pathv_matrix_point_bbox_wind_distance (Geom::PathVector const &pathv, Geom::Affine const &m, Geom::Point const &pt, Geom::Rect *bbox, int *wind, Geom::Coord *dist, Geom::Coord tolerance, Geom::Rect const *viewbox) |
bool | pathvs_have_nonempty_overlap (Geom::PathVector const &a, Geom::PathVector const &b) |
An exact check for whether the two pathvectors intersect or overlap, including the case of a line crossing through a solid shape. | |
bool | pathv_fully_contains (Geom::PathVector const &a, Geom::PathVector const &b, FillRule fill_rule, double precision) |
Checks whether the filled region defined by pathvector a and fill rule fill_rule completely contains pathvector b. | |
Geom::PathVector | pathv_to_linear_and_cubic_beziers (Geom::PathVector const &pathv) |
Geom::PathVector | pathv_to_linear (Geom::PathVector const &pathv, double) |
Geom::PathVector | pathv_to_cubicbezier (Geom::PathVector const &pathv, bool nolines) |
size_t | count_pathvector_nodes (Geom::PathVector const &pathv) |
size_t | count_pathvector_curves (Geom::PathVector const &pathv) |
size_t | count_pathvector_degenerations (Geom::PathVector const &pathv) |
size_t | count_path_degenerations (Geom::Path const &path) |
size_t | count_path_nodes (Geom::Path const &path) |
size_t | count_path_curves (Geom::Path const &path) |
void | recursive_bezier4 (const double x1, const double y1, const double x2, const double y2, const double x3, const double y3, const double x4, const double y4, std::vector< Geom::Point > &m_points, int level) |
bool | approx_dihedral (Geom::Affine const &affine, double eps) |
Returns whether an affine transformation is approximately a dihedral transformation, i.e. | |
bool approx_dihedral | ( | Geom::Affine const & | affine, |
double | eps | ||
) |
Geom::OptRect bounds_exact_transformed | ( | Geom::PathVector const & | pv, |
Geom::Affine const & | t | ||
) |
Definition at line 153 of file geom.cpp.
References Geom::PathVector::empty(), and Geom::PathVector::initialPoint().
Referenced by Inkscape::CanvasItemBpath::_update(), Inkscape::DrawingShape::_updateItem(), SPHatchPath::bounds(), bounds_fast_transformed(), and SPShape::either_bbox().
Geom::OptRect bounds_fast_transformed | ( | Geom::PathVector const & | pv, |
Geom::Affine const & | t | ||
) |
Definition at line 147 of file geom.cpp.
References bounds_exact_transformed().
Geom::OptRect check_simple_rect | ( | Geom::PathVector const & | pathv, |
double | precision | ||
) |
Definition at line 198 of file geom.cpp.
References Geom::are_near(), end, Geom::PathVector::front(), Geom::Path::initialPoint(), Geom::PathVector::size(), start, Geom::Point::x(), and Geom::Point::y().
Referenced by pathv_fully_contains().
size_t count_path_curves | ( | Geom::Path const & | path | ) |
Definition at line 821 of file geom.cpp.
References Geom::Path::back_closed(), Geom::Path::closed(), Geom::Path::empty(), and Geom::Path::size_default().
Referenced by count_pathvector_curves(), Inkscape::LivePathEffect::LPEFilletChamfer::doBeforeEffect(), Inkscape::LivePathEffect::LPEFilletChamfer::doEffect_path(), and PathVectorNodeSatellites::recalculateForNewPathVector().
size_t count_path_degenerations | ( | Geom::Path const & | path | ) |
Definition at line 764 of file geom.cpp.
References Geom::are_near(), Geom::Path::back_closed(), Geom::Path::begin(), Geom::Path::closed(), Geom::Path::empty(), Geom::Path::end_default(), and Geom::Path::end_open().
Referenced by count_pathvector_degenerations().
size_t count_path_nodes | ( | Geom::Path const & | path | ) |
Definition at line 796 of file geom.cpp.
References Geom::Path::back_closed(), Geom::Path::closed(), Geom::Path::empty(), and Geom::Path::size_default().
Referenced by PathVectorNodeSatellites::convertUnit(), count_pathvector_nodes(), Inkscape::LivePathEffect::FilletChamferKnotHolderEntity::knot_click(), Inkscape::LivePathEffect::FilletChamferKnotHolderEntity::knot_get(), Inkscape::LivePathEffect::FilletChamferKnotHolderEntity::knot_set(), Inkscape::LivePathEffect::FilletChamferKnotHolderEntity::knot_set_offset(), Inkscape::LivePathEffect::LPETransform2Pts::nodeCount(), PathVectorNodeSatellites::recalculateForNewPathVector(), PathVectorNodeSatellites::updateAmount(), Inkscape::LivePathEffect::NodeSatelliteArrayParam::updateCanvasIndicators(), and PathVectorNodeSatellites::updateNodeSatelliteType().
size_t count_pathvector_curves | ( | Geom::PathVector const & | pathv | ) |
Definition at line 747 of file geom.cpp.
References count_path_curves().
Referenced by Inkscape::LivePathEffect::Effect::doBeforeEffect_impl(), Inkscape::LivePathEffect::LPEPowerStroke::doEffect_path(), Inkscape::LivePathEffect::LPEPowerStroke::doOnApply(), Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_set(), and Inkscape::LivePathEffect::sp_calculate_origin().
size_t count_pathvector_degenerations | ( | Geom::PathVector const & | pathv | ) |
Definition at line 756 of file geom.cpp.
References count_path_degenerations().
size_t count_pathvector_nodes | ( | Geom::PathVector const & | pathv | ) |
Definition at line 738 of file geom.cpp.
References count_path_nodes().
|
static |
Definition at line 33 of file geom.cpp.
References c, Geom::GenericRect< C >::contains(), D, Geom::EPSILON, and Geom::GenericRect< C >::expandTo().
Referenced by geom_cubic_bbox_wind_distance().
|
static |
Definition at line 290 of file geom.cpp.
References cubic_bbox(), geom_cubic_bbox_wind_distance(), and geom_line_wind_distance().
Referenced by geom_cubic_bbox_wind_distance(), and geom_curve_bbox_wind_distance().
|
static |
Definition at line 379 of file geom.cpp.
References c, Geom::cubicbezierpath_from_sbasis(), Geom::GenericRect< C >::expandTo(), geom_cubic_bbox_wind_distance(), geom_curve_bbox_wind_distance(), geom_line_wind_distance(), Geom::GenericRect< C >::intersects(), order, and Geom::Exception::what().
Referenced by geom_curve_bbox_wind_distance(), and pathv_matrix_point_bbox_wind_distance().
|
static |
Definition at line 234 of file geom.cpp.
Referenced by geom_cubic_bbox_wind_distance(), geom_curve_bbox_wind_distance(), and pathv_matrix_point_bbox_wind_distance().
bool pathv_fully_contains | ( | Geom::PathVector const & | a, |
Geom::PathVector const & | b, | ||
FillRule | fill_rule, | ||
double | precision | ||
) |
Checks whether the filled region defined by pathvector a and fill rule fill_rule completely contains pathvector b.
Definition at line 551 of file geom.cpp.
References Geom::PathVector::boundsExact(), check_simple_rect(), Geom::GenericOptRect< C >::contains(), Geom::PathVector::intersect(), is_point_inside(), and Geom::PathVector::winding().
Referenced by Inkscape::Extension::Internal::SvgBuilder::_shouldClip().
void pathv_matrix_point_bbox_wind_distance | ( | Geom::PathVector const & | pathv, |
Geom::Affine const & | m, | ||
Geom::Point const & | pt, | ||
Geom::Rect * | bbox, | ||
int * | wind, | ||
Geom::Coord * | dist, | ||
Geom::Coord | tolerance, | ||
Geom::Rect const * | viewbox | ||
) |
Definition at line 465 of file geom.cpp.
References Geom::PathVector::empty(), Geom::GenericRect< C >::expandTo(), geom_curve_bbox_wind_distance(), geom_line_wind_distance(), and Geom::infinity().
Referenced by Inkscape::DrawingShape::_pickItem().
bool pathv_similar | ( | Geom::PathVector const & | apv, |
Geom::PathVector const & | bpv, | ||
double | precision | ||
) |
Definition at line 176 of file geom.cpp.
References Geom::are_near(), Geom::PathVector::curveCount(), and Geom::PathVector::pointAt().
Referenced by equal_clip().
Geom::PathVector pathv_to_cubicbezier | ( | Geom::PathVector const & | pathv, |
bool | nolines | ||
) |
Definition at line 690 of file geom.cpp.
References Geom::Path::append(), Geom::Path::appendNew(), Geom::are_near(), Geom::PathVector::back(), Geom::Path::begin(), Geom::Path::close(), Geom::cubicbezierpath_from_sbasis(), Geom::Path::end_open(), Geom::Path::initialPoint(), is_straight_curve(), Geom::PathVector::push_back(), and Geom::Path::start().
Referenced by Inkscape::UI::PathManipulator::_createControlPointsFromGeometry(), and Inkscape::LivePathEffect::LPELattice2::doEffect_pwd2().
Geom::PathVector pathv_to_linear | ( | Geom::PathVector const & | pathv, |
double | maxdisp | ||
) |
Definition at line 634 of file geom.cpp.
References Geom::Path::append(), Geom::PathVector::back(), Geom::Path::close(), D, is_straight_curve(), pathv_to_linear_and_cubic_beziers(), Geom::PathVector::push_back(), recursive_bezier4(), and Geom::Path::start().
Referenced by Inkscape::Extension::Internal::PrintWmf::print_pathv(), and Inkscape::Extension::Internal::PrintWmf::print_simple_shape().
Geom::PathVector pathv_to_linear_and_cubic_beziers | ( | Geom::PathVector const & | pathv | ) |
Definition at line 586 of file geom.cpp.
References Geom::Path::append(), Geom::PathVector::back(), Geom::Path::close(), Geom::cubicbezierpath_from_sbasis(), is_straight_curve(), Geom::PathVector::push_back(), Geom::Path::setStitching(), Geom::Path::start(), and Geom::Exception::what().
Referenced by Inkscape::UI::PathManipulator::_createControlPointsFromGeometry(), Inkscape::LivePathEffect::collectPathsAndWidths(), Inkscape::do_offset(), Inkscape::LivePathEffect::LPEFilletChamfer::doBeforeEffect(), Inkscape::LivePathEffect::LPEMeasureSegments::doBeforeEffect(), Inkscape::LivePathEffect::LPETaperStroke::doBeforeEffect(), Inkscape::Extension::Internal::PovOutput::doCurve(), Inkscape::LivePathEffect::LPEPerspectiveEnvelope::doEffect(), Inkscape::LivePathEffect::LPERoughen::doEffect(), Inkscape::LivePathEffect::LPESimplify::doEffect(), Inkscape::LivePathEffect::LPEKnot::doEffect_path(), Inkscape::LivePathEffect::LPECopyRotate::doEffect_path(), Inkscape::LivePathEffect::LPEDashedStroke::doEffect_path(), Inkscape::LivePathEffect::LPEMirrorSymmetry::doEffect_path(), Inkscape::LivePathEffect::LPEPowerStroke::doEffect_path(), Inkscape::LivePathEffect::LPEShowHandles::doEffect_path(), Inkscape::LivePathEffect::LPECopyRotate::doEffect_path_post(), Inkscape::LivePathEffect::LPETiling::doEffect_path_post(), Inkscape::LivePathEffect::LPEFilletChamfer::doOnApply(), Inkscape::LivePathEffect::LPEPowerStroke::doOnApply(), Inkscape::Extension::Internal::PrintEmf::draw_pathv_to_EMF(), item_find_paths(), pathv_to_linear(), Inkscape::Extension::Internal::PrintEmf::pathv_to_simple_polygon(), Inkscape::Extension::Internal::PrintEmf::print_simple_shape(), Inkscape::UI::Tools::MeasureTool::showCanvasItems(), Inkscape::LivePathEffect::sp_pathvector_boolop_remove_inner(), Inkscape::LivePathEffect::sp_pathvector_boolop_slice_intersect(), Inkscape::LivePathEffect::LPESlice::splititem(), and Inkscape::Extension::Internal::writePath().
bool pathvs_have_nonempty_overlap | ( | Geom::PathVector const & | a, |
Geom::PathVector const & | b | ||
) |
An exact check for whether the two pathvectors intersect or overlap, including the case of a line crossing through a solid shape.
Definition at line 513 of file geom.cpp.
References Geom::PathVector::boundsFast(), Geom::SimpleCrosser::crossings(), node, Geom::PathVector::nodes(), and Geom::PathVector::winding().
Referenced by SPItem::collidesWith().
bool pointInTriangle | ( | Geom::Point const & | p, |
Geom::Point const & | p1, | ||
Geom::Point const & | p2, | ||
Geom::Point const & | p3 | ||
) |
void recursive_bezier4 | ( | const double | x1, |
const double | y1, | ||
const double | x2, | ||
const double | y2, | ||
const double | x3, | ||
const double | y3, | ||
const double | x4, | ||
const double | y4, | ||
std::vector< Geom::Point > & | m_points, | ||
int | level | ||
) |
Definition at line 869 of file geom.cpp.
References recursive_bezier4().
Referenced by pathv_to_linear(), and recursive_bezier4().