Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Primitives

Basic mathematical objects such as intervals and points. More...

Classes

class  Geom::Angle
 Wrapper for angular values. More...
 
class  Geom::AngleInterval
 Directed angular interval. More...
 
class  Geom::GenericInterval< C >
 A range of numbers which is never empty. More...
 
class  Geom::GenericOptInterval< C >
 A range of numbers that can be empty. More...
 
class  Geom::GenericRect< C >
 Axis aligned, non-empty, generic rectangle. More...
 
class  Geom::GenericOptRect< C >
 Axis-aligned generic rectangle that can be empty. More...
 
class  Geom::IntPoint
 Two-dimensional point with integer coordinates. More...
 
class  Geom::Interval
 Range of real numbers that is never empty. More...
 
class  Geom::OptInterval
 Range of real numbers that can be empty. More...
 
class  Geom::Ray
 Straight ray from a specific point to infinity. More...
 
class  Geom::Rect
 Axis aligned, non-empty rectangle. More...
 
class  Geom::OptRect
 Axis-aligned rectangle that can be empty. More...
 
class  Geom::Line
 Infinite line on a plane. More...
 
class  Geom::Point
 Two-dimensional point that doubles as a vector. More...
 

Typedefs

using Geom::Coord = double
 Floating point type used to store coordinates.
 
using Geom::IntCoord = int
 Type used for integral coordinates.
 
using Geom::IntInterval = GenericInterval< IntCoord >
 Range of integers that is never empty.
 
using Geom::OptIntInterval = GenericOptInterval< IntCoord >
 Range of integers that can be empty.
 

Enumerations

enum  Geom::Dim2 { Geom::X = 0 , Geom::Y = 1 }
 2D axis enumeration (X or Y). More...
 

Functions

constexpr Dim2 Geom::other_dimension (Dim2 d)
 Get the other (perpendicular) dimension.
 
constexpr Coord Geom::infinity ()
 Get a value representing infinity.
 
bool Geom::are_near (Coord a, Coord b, double eps=EPSILON)
 Nearness predicate for values.
 
constexpr Coord Geom::lerp (Coord t, Coord a, Coord b)
 Numerically stable linear interpolation.
 

Variables

constexpr Coord Geom::EPSILON = 1e-6
 Default "acceptably small" value.
 

Detailed Description

Basic mathematical objects such as intervals and points.

2Geom has several basic geometrical objects: points, lines, intervals, angles, and others. Most of those objects can be treated as sets of points or numbers satisfying some equation or as functions.

Typedef Documentation

◆ Coord

typedef double Geom::Coord

Floating point type used to store coordinates.

Definition at line 76 of file coord.h.

◆ IntCoord

typedef int Geom::IntCoord

Type used for integral coordinates.

Definition at line 80 of file coord.h.

◆ IntInterval

Range of integers that is never empty.

Definition at line 51 of file forward.h.

◆ OptIntInterval

Range of integers that can be empty.

Definition at line 52 of file forward.h.

Enumeration Type Documentation

◆ Dim2

enum Geom::Dim2

2D axis enumeration (X or Y).

Enumerator

Definition at line 48 of file coord.h.

Function Documentation

◆ are_near()

bool Geom::are_near ( Coord  a,
Coord  b,
double  eps = EPSILON 
)
inline

Nearness predicate for values.

Definition at line 92 of file coord.h.

◆ infinity()

constexpr Coord Geom::infinity ( )
constexpr

Get a value representing infinity.

Definition at line 88 of file coord.h.

Referenced by Inkscape::DrawingShape::_pickItem(), BlurKnotHolderEntity::_pos(), Inkscape::CanvasItemGridXY::_render(), Inkscape::CanvasItemCatchall::_update(), Inkscape::CanvasItemGridXY::_update(), Inkscape::CanvasItemGridTiles::_update(), Inkscape::CanvasItemGridAxonom::_update(), Inkscape::CanvasItemGuideLine::_update(), Inkscape::LivePathEffect::LPEOffset::addKnotHolderEntities(), Proj::Pt2::affine(), Geom::PathVector::allNearestTimes(), Geom::at_infinity(), box3d_snap(), Inkscape::CanvasItemBpath::closest_distance_to(), Inkscape::CanvasItemCurve::closest_distance_to(), SnapManager::constrainedSnap(), Inkscape::do_offset(), Inkscape::do_offset(), Inkscape::LivePathEffect::LPEOffset::doAfterEffect(), Inkscape::LivePathEffect::LPEMeasureSegments::doBeforeEffect(), Inkscape::LivePathEffect::LPESlice::doBeforeEffect(), Inkscape::LivePathEffect::LPEFillBetweenMany::doEffect(), Inkscape::LivePathEffect::LPEOffset::doEffect_path(), GrDrag::dropColor(), Inkscape::LivePathEffect::LPEEmbroderyStitchOrdering::OrderingPoint::FindNearest2(), SnapManager::freeSnap(), SPBox3D::get_center_screen(), SPBox3D::get_corner_screen(), Inkscape::LivePathEffect::LPEOffset::get_default_point(), Proj::TransfMat3x4::get_infinite_angle(), Inkscape::LivePathEffect::get_nearest_point(), Box3D::VanishingPoint::get_pos(), get_scale_transform_for_uniform_stroke(), get_scale_transform_for_variable_stroke(), get_visual_bbox(), Inkscape::SnappedPoint::getDistanceToAlignTarget(), Inkscape::SnappedPoint::getSnapped(), gr_knot_moved_handler(), Inkscape::UI::PathManipulator::insertNodeAtExtremum(), Geom::BezierCurveN< degree >::intersect(), Geom::Ellipse::intersect(), Inkscape::SnappedCurve::intersect(), Inkscape::SnappedLine::intersect(), Inkscape::SnappedCurve::intersect(), Inkscape::SnappedLineSegment::intersect(), Geom::intersection_point(), Inkscape::SnappedPoint::isOtherSnapBetter(), Inkscape::LivePathEffect::FilletChamferKnotHolderEntity::knot_get(), Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_get(), FilterKnotHolderEntity::knot_get(), Inkscape::LivePathEffect::PowerStrokePointArrayParam::knot_get(), Inkscape::LivePathEffect::LPECurveStitch::LPECurveStitch(), Inkscape::LivePathEffect::LPEOffset::LPEOffset(), Inkscape::Colors::Space::OkLch::max_chroma(), Geom::monotonic_smash_intersect(), SnapManager::multipleConstrainedSnaps(), SnapManager::multipleOfGridPitch(), Geom::nearest_time(), Geom::PathVector::nearestTime(), Proj::Pt2::operator[](), Proj::Pt3::operator[](), Inkscape::LivePathEffect::LPEEmbroderyStitchOrdering::OrderingClosest(), pathv_matrix_point_bbox_wind_distance(), Inkscape::UI::Tools::PencilTool::powerStrokeInterpolate(), Inkscape::UI::Tools::MeasureTool::readMeasurePoint(), Inkscape::LivePathEffect::ArrayParam< StorageType >::readsvg(), Geom::xAx::set(), Geom::xAx::set(), Inkscape::UI::Toolbar::Box3DToolbar::set_button_and_adjustment(), Inkscape::LivePathEffect::LPESimplify::setVersioningData(), smash_intersect(), Inkscape::PureTransform::snap(), Inkscape::SnappedCurve::SnappedCurve(), Inkscape::SnappedCurve::SnappedCurve(), Inkscape::SnappedLine::SnappedLine(), Inkscape::SnappedLine::SnappedLine(), Inkscape::SnappedLineSegment::SnappedLineSegment(), Inkscape::SnappedLineSegment::SnappedLineSegment(), Inkscape::LivePathEffect::LPEOffset::sp_get_offset(), Inkscape::PureScale::storeTransform(), Inkscape::PureStretchConstrained::storeTransform(), Inkscape::PureSkewConstrained::storeTransform(), Inkscape::PureRotateConstrained::storeTransform(), stroke_average_width(), TEST(), and Inkscape::LivePathEffect::LPEKnot::updateSwitcher().

◆ lerp()

◆ other_dimension()

constexpr Dim2 Geom::other_dimension ( Dim2  d)
constexpr

Get the other (perpendicular) dimension.

Definition at line 52 of file coord.h.

Referenced by Geom::Line::clip(), Geom::Path::extrema(), and Geom::Line::rotationToAxis().

Variable Documentation

◆ EPSILON