Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-shape.h File Reference

Go to the source code of this file.

Classes

class  SPShape
 Base class for shapes, including <path> element. More...
 

Namespaces

namespace  Inkscape
 Helper class to stream background task notifications as a series of messages.
 

Functions

Geom::Affine sp_shape_marker_get_transform (Geom::Curve const &c1, Geom::Curve const &c2)
 Calculate the transform required to get a marker's path object in the right place for particular path segment on a shape.
 
Geom::Affine sp_shape_marker_get_transform_at_start (Geom::Curve const &c)
 
Geom::Affine sp_shape_marker_get_transform_at_end (Geom::Curve const &c)
 

Function Documentation

◆ sp_shape_marker_get_transform()

Geom::Affine sp_shape_marker_get_transform ( Geom::Curve const &  c1,
Geom::Curve const &  c2 
)

Calculate the transform required to get a marker's path object in the right place for particular path segment on a shape.

See also
sp_shape_marker_update_marker_view.

From SVG spec: The axes of the temporary new user coordinate system are aligned according to the orient attribute on the 'marker' element and the slope of the curve at the given vertex. (Note: if there is a discontinuity at a vertex, the slope is the average of the slopes of the two segments of the curve that join at the given vertex. If a slope cannot be determined, the slope is assumed to be zero.)

Reference: http://www.w3.org/TR/SVG11/painting.html#MarkerElement, the ‘orient’ attribute. Reference for behaviour of zero-length segments: http://www.w3.org/TR/SVG11/implnote.html#PathElementImplementationNotes

Definition at line 340 of file sp-shape.cpp.

References Geom::atan2(), Geom::Curve::pointAt(), Geom::Curve::reverse(), and Geom::Curve::unitTangentAt().

Referenced by SPShape::get_markers().

◆ sp_shape_marker_get_transform_at_end()

Geom::Affine sp_shape_marker_get_transform_at_end ( Geom::Curve const &  c)

Definition at line 383 of file sp-shape.cpp.

References Geom::atan2(), c, Geom::Curve::reverse(), and Geom::Curve::unitTangentAt().

Referenced by SPShape::get_markers().

◆ sp_shape_marker_get_transform_at_start()

Geom::Affine sp_shape_marker_get_transform_at_start ( Geom::Curve const &  c)

Definition at line 366 of file sp-shape.cpp.

References Geom::atan2(), and c.

Referenced by SPShape::get_markers().