26fe967f30c5b0de45897a858d1ae09dff7c0ea7kiirala * A container class for filter slots. Allows for simple getting and
26fe967f30c5b0de45897a858d1ae09dff7c0ea7kiirala * setting images in filter slots without having to bother with
26fe967f30c5b0de45897a858d1ae09dff7c0ea7kiirala * table indexes and such.
26fe967f30c5b0de45897a858d1ae09dff7c0ea7kiirala * Niko Kiirala <niko@kiirala.com>
bc44e67acb1457725817238120bcef0d1f1ada04kiirala * Copyright (C) 2006,2007 Niko Kiirala
26fe967f30c5b0de45897a858d1ae09dff7c0ea7kiirala * Released under GNU GPL, read the file 'COPYING' for more information
74492c140ec4f83d0e713407c63a05c370e70e4aKrzysztof Kosiński /** Creates a new FilterSlot object. */
ed422cc32e064690397f1e4aeb526ebda5fbca77Krzysztof Kosiński DrawingContext &graphic, FilterUnits const &u);
cfb5fa826062314dac912b3627f932aab8250988kiirala /** Destroys the FilterSlot object and all its contents */
cfb5fa826062314dac912b3627f932aab8250988kiirala /** Returns the pixblock in specified slot.
cfb5fa826062314dac912b3627f932aab8250988kiirala * Parameter 'slot' may be either an positive integer or one of
cfb5fa826062314dac912b3627f932aab8250988kiirala * pre-defined filter slot types: NR_FILTER_SLOT_NOT_SET,
cfb5fa826062314dac912b3627f932aab8250988kiirala * NR_FILTER_SOURCEGRAPHIC, NR_FILTER_SOURCEALPHA,
cfb5fa826062314dac912b3627f932aab8250988kiirala * NR_FILTER_BACKGROUNDIMAGE, NR_FILTER_BACKGROUNDALPHA,
cfb5fa826062314dac912b3627f932aab8250988kiirala * NR_FILTER_FILLPAINT, NR_FILTER_SOURCEPAINT.
cfb5fa826062314dac912b3627f932aab8250988kiirala /** Sets or re-sets the pixblock associated with given slot.
cfb5fa826062314dac912b3627f932aab8250988kiirala * If there was a pixblock already assigned with this slot,
cfb5fa826062314dac912b3627f932aab8250988kiirala * that pixblock is destroyed.
4d2111f1991274cf80f89219637fca969697e661Krzysztof Kosiński cairo_surface_t *get_result(int slot_nr);
f79bb40cee052ef5a8e147c93e17312a7a660b81tavmjong-free void set_primitive_area(int slot, Geom::Rect &area);
cfb5fa826062314dac912b3627f932aab8250988kiirala /** Returns the number of slots in use. */
bc44e67acb1457725817238120bcef0d1f1ada04kiirala /** Sets the unit system to be used for the internal images. */
4d2111f1991274cf80f89219637fca969697e661Krzysztof Kosiński //void set_units(FilterUnits const &units);
e9b6af083e34e2397a8ddbe9781920733d09d151Ted Gould /** Sets the filtering quality. Affects used interpolation methods */
a657cb9a6e1aca06d04f49bd9844e89c91e34f76theAdib /** Sets the gaussian filtering quality. Affects used interpolation methods */
a657cb9a6e1aca06d04f49bd9844e89c91e34f76theAdib void set_blurquality(int const q);
a657cb9a6e1aca06d04f49bd9844e89c91e34f76theAdib /** Gets the gaussian filtering quality. Affects used interpolation methods */
4d2111f1991274cf80f89219637fca969697e661Krzysztof Kosiński FilterUnits const &get_units() const { return _units; }
4d2111f1991274cf80f89219637fca969697e661Krzysztof Kosiński typedef std::map<int, cairo_surface_t *> SlotMap;
f79bb40cee052ef5a8e147c93e17312a7a660b81tavmjong-free // We need to keep track of the primitive area as this is needed in feTile
f79bb40cee052ef5a8e147c93e17312a7a660b81tavmjong-free typedef std::map<int, Geom::Rect> PrimitiveAreaMap;
4d2111f1991274cf80f89219637fca969697e661Krzysztof Kosiński //Geom::Rect _source_bbox; ///< bounding box of source graphic surface
4d2111f1991274cf80f89219637fca969697e661Krzysztof Kosiński //Geom::Rect _intermediate_bbox; ///< bounding box of intermediate surfaces
ed422cc32e064690397f1e4aeb526ebda5fbca77Krzysztof Kosiński Geom::IntRect _background_area; ///< needed to extract background
4d2111f1991274cf80f89219637fca969697e661Krzysztof Kosiński cairo_surface_t *_get_transformed_source_graphic();
4d2111f1991274cf80f89219637fca969697e661Krzysztof Kosiński cairo_surface_t *_get_transformed_background();
4d2111f1991274cf80f89219637fca969697e661Krzysztof Kosiński void _set_internal(int slot, cairo_surface_t *s);
d9a7c806ee7f408ddb61ff4f233c9d96111ee2b5johanengelen} /* namespace Filters */
d9a7c806ee7f408ddb61ff4f233c9d96111ee2b5johanengelen} /* namespace Inkscape */
26fe967f30c5b0de45897a858d1ae09dff7c0ea7kiirala#endif // __NR_FILTER_SLOT_H__
26fe967f30c5b0de45897a858d1ae09dff7c0ea7kiirala Local Variables:
26fe967f30c5b0de45897a858d1ae09dff7c0ea7kiirala c-file-style:"stroustrup"
26fe967f30c5b0de45897a858d1ae09dff7c0ea7kiirala c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
26fe967f30c5b0de45897a858d1ae09dff7c0ea7kiirala indent-tabs-mode:nil
26fe967f30c5b0de45897a858d1ae09dff7c0ea7kiirala fill-column:99
a4030d5ca449e7e384bc699cd249ee704faaeab0Chris Morgan// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :