2#ifndef SEEN_SP_MARKER_H
3#define SEEN_SP_MARKER_H
45 int tag()
const override {
return tag_of<
decltype(*this)>; }
82 void hide(
unsigned int key)
override;
91 return static_cast<SPMarker *
>(URIReference::getObject());
95 return is<SPMarker>(obj) && URIReference::_acceptObject(obj);
102 unsigned int key,
unsigned int pos,
unsigned int z_order,
3x3 affine transformation matrix.
constexpr int tag_of
Convenience function to retrieve the tag (class id) of a given type.
3x3 matrix representing an affine transformation.
Two-dimensional point that doubles as a vector.
Axis aligned, non-empty rectangle.
SVG drawing item for display.
A class encapsulating a reference to a particular URI; observers can be notified when the URI comes t...
URIReference(SPObject *owner)
Constructor.
Interface for refcounted XML nodes.
Typed SVG document implementation.
SPMarkerReference(SPObject *obj)
bool _acceptObject(SPObject *obj) const override
SPMarker * getObject() const
void release() override
Removes, releases and unrefs all children of object.
std::map< unsigned int, SPMarkerView > views_map
unsigned int markerUnits_set
Inkscape::DrawingItem * show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) override
virtual Inkscape::DrawingItem * private_show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags)
void hide(unsigned int key) override
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) override
void print(SPPrintContext *ctx) override
Geom::Affine get_marker_transform(Geom::Affine const &base, double linewidth, bool for_display=false) const
Calculate the transformation for this marker.
~SPMarker() override
Initializes an SPMarker object.
void update(SPCtx *ctx, guint flags) override
void build(SPDocument *document, Inkscape::XML::Node *repr) override
Virtual build callback for SPMarker.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Inkscape::XML::Node * repr
static char const *const parent
static cairo_user_data_key_t key
void sp_marker_set_orient(SPMarker *marker, const char *value)
void sp_marker_hide(SPMarker *marker, unsigned int key)
Hides/removes all views of the given marker that have key 'key'.
void sp_marker_scale_with_stroke(SPMarker *marker, bool scale_with_stroke)
const char * generate_marker(std::vector< Inkscape::XML::Node * > &reprs, Geom::Rect bounds, SPDocument *document, Geom::Point center, Geom::Affine move)
@ MARKER_ORIENT_AUTO_START_REVERSE
Inkscape::DrawingItem * sp_marker_show_instance(SPMarker *marker, Inkscape::DrawingItem *parent, unsigned int key, unsigned int pos, unsigned int z_order, Geom::Affine const &marker_transform, float linewidth)
Shows an instance of a marker.
void sp_validate_marker(SPMarker *sp_marker, SPDocument *doc)
SPObject * sp_marker_fork_if_necessary(SPObject *marker)
void sp_marker_set_offset(SPMarker *marker, double dx, double dy)
void sp_marker_set_uniform_scale(SPMarker *marker, bool uniform)
void sp_marker_set_size(SPMarker *marker, double sx, double sy)
void sp_marker_show_dimension(SPMarker *marker, unsigned int key, unsigned int size)
Removes any SPMarkerViews that a marker has with a specific key.
void sp_marker_flip_horizontally(SPMarker *marker)
Interface for XML documents.