/*
6 * Lauris Kaplinski <lauris@kaplinski.com>
9 * Copyright (C) 2002 Lauris Kaplinski
11 * Released under GNU GPL v2+, read the file
'COPYING' for more information.
14#ifndef SEEN_SP_PATTERN_H
15#define SEEN_SP_PATTERN_H
20#include <glibmm/ustring.h>
21#include <sigc++/connection.h>
62 int tag()
const override {
return tag_of<
decltype(*this)>; }
101 void modified(
unsigned flags)
override;
108 void hide(
unsigned key)
override;
constexpr int tag_of
Convenience function to retrieve the tag (class id) of a given type.
3x3 matrix representing an affine transformation.
static CRect from_xywh(Coord x, Coord y, Coord w, Coord h)
Create rectangle from origin and dimensions.
Axis-aligned rectangle that can be empty.
Axis aligned, non-empty rectangle.
Drawing tree node used for rendering paints.
A class encapsulating a reference to a particular URI; observers can be notified when the URI comes t...
Interface for refcounted XML nodes.
Typed SVG document implementation.
Base class for visual SVG elements.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Inkscape::XML::Node * repr
bool _acceptObject(SPObject *obj) const override
SPPattern * getObject() const
void setBBox(unsigned key, Geom::OptRect const &bbox) override
void order_changed(Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref) override
unsigned _countHrefs(SPObject *o) const
Count how many times pattern is used by the styles of o and its descendants.
SPPattern::PatternUnits patternUnits() const
static char const * produce(std::vector< Inkscape::XML::Node * > const &reprs, Geom::Rect const &bounds, SPDocument *document, Geom::Affine const &transform, Geom::Affine const &move)
create a new pattern in XML tree
void transform_multiply(Geom::Affine postmul, bool set)
sigc::connection shown_released_connection
void _onRefChanged(SPObject *old_ref, SPObject *ref)
Gets called when the pattern is reattached to another <pattern>
SPPattern::PatternUnits patternContentUnits() const
SPPattern const * rootPattern() const
Geom::Affine _pattern_transform
void unattach_view(Inkscape::DrawingPattern *di)
bool hasItemChildren() const
sigc::connection _modified_connection
void child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) override
void set_shown(SPPattern *new_shown)
bool isValid() const override
SPPattern * shown
The pattern at the end of the href chain, currently tasked with keeping our DrawingPattern up to date...
PatternUnits _pattern_units
void hide(unsigned key) override
Geom::Rect getBox() const
void attach_view(Inkscape::DrawingPattern *di, unsigned key)
Inkscape::DrawingPattern * show(Inkscape::Drawing &drawing, unsigned key, Geom::OptRect const &bbox) override
void update_view(View &v)
void modified(unsigned flags) override
bool _pattern_transform_set
bool _pattern_content_units_set
std::vector< View > views
SPPattern * clone_if_necessary(SPItem *item, char const *property)
Geom::OptRect viewbox() const
std::vector< AttachedView > attached_views
void update(SPCtx *ctx, unsigned flags) override
void _onRefModified(SPObject *ref, unsigned flags)
Gets called when the referenced <pattern> is changed.
void build(SPDocument *doc, Inkscape::XML::Node *repr) override
PatternUnits _pattern_content_units
Geom::Affine const & getTransform() const
@ UNITS_OBJECTBOUNDINGBOX
void remove_child(Inkscape::XML::Node *child) override
SPPattern * _chain() const
const Geom::Affine & get_this_transform() const
Helper class to stream background task notifications as a series of messages.
static cairo_user_data_key_t key
View helper class used by hatch, clippath, mask and pattern.
Drawing items belonging to other patterns with this pattern at the end of their href chain.
Inkscape::DrawingPattern * drawingitem