64 if (input == 0)
_input = slot;
107 std::cerr <<
"FilterPrimitive::filter_primitive_area: filter area undefined." << std::endl;
130 std::cerr <<
"FilterPrimitive::filter_primitive_area: bounding box undefined and 'primitiveUnits' is 'objectBoundingBox'." << std::endl;
138 auto const len_x = bb.
width();
139 auto const len_y = bb.
height();
142 length.update(12, 6,
scale);
143 return length.computed;
146 auto const subregion_x_computed = compute(
_subregion_x, len_x);
147 auto const subregion_y_computed = compute(
_subregion_y, len_y);
static CRect from_xywh(Coord x, Coord y, Coord w, Coord h)
Create rectangle from origin and dimensions.
C top() const
Return top coordinate of the rectangle (+Y is downwards).
C left() const
Return leftmost coordinate of the rectangle (+X is to the right).
C height() const
Get the vertical extent of the rectangle.
C width() const
Get the horizontal extent of the rectangle.
Axis-aligned rectangle that can be empty.
Axis aligned, non-empty rectangle.
SVGLength _subregion_width
SVGLength _subregion_height
void set_width(SVGLength const &length)
virtual void set_output(int slot)
Sets the slot number 'slot' to be used as output from filter primitive 'primitive' If output slot for...
SPColorInterpolation color_interpolation
Geom::Rect filter_primitive_area(FilterUnits const &units) const
Returns the filter primitive area in user coordinate system.
virtual ~FilterPrimitive()
virtual void render_cairo(FilterSlot &slot) const
void setStyle(SPStyle const *style)
Sets style for access to properties used by filter primitives.
void set_subregion(SVGLength const &x, SVGLength const &y, SVGLength const &width, SVGLength const &height)
void set_x(SVGLength const &length)
Sets the filter primitive subregion.
virtual void set_input(int slot)
Sets the input slot number 'slot' to be used as input in rendering filter primitive 'primitive' For f...
void set_y(SVGLength const &length)
void set_height(SVGLength const &length)
cairo_surface_t * getcairo(int slot)
Returns the pixblock in specified slot.
void set(int slot, cairo_surface_t *s)
Sets or re-sets the pixblock associated with given slot.
SPFilterUnits get_primitive_units() const
Gets Primitive Units (userSpaceOnUse or objectBoundingBox)
Geom::OptRect get_filter_area() const
Gets the filter effects area in user coordinates.
Geom::OptRect get_item_bbox() const
Gets the item bounding box in user coordinates.
T< SPAttr::COLOR_INTERPOLATION_FILTERS, SPIEnum< SPColorInterpolation > > color_interpolation_filters
color-interpolation-filters
void unset(Unit u=NONE, float v=0, float c=0)
struct _cairo_surface cairo_surface_t
Helper class to stream background task notifications as a series of messages.
TODO: insert short description here.
TODO: insert short description here.
@ SP_FILTER_UNITS_OBJECTBOUNDINGBOX
@ SP_CSS_COLOR_INTERPOLATION_AUTO
SPStyle - a style object for SPItem objects.