cairo-utils.h revision e69a0e74868212310d9036c55d66070190d861b6
/**
* @file
* @brief Cairo integration helpers
*//*
* Authors:
* Krzysztof KosiĆski <tweenk.pl@gmail.com>
*
* Copyright (C) 2010 Authors
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <glib.h>
/** @brief RAII idiom for Cairo groups.
* Groups are temporary surfaces used when rendering e.g. masks and opacity.
* Use this class to ensure that each group push is matched with a pop. */
~CairoGroup();
void push();
cairo_pattern_t *pop();
void pop_to_source();
bool pushed;
};
/** @brief RAII idiom for Cairo state saving */
{
if (save) {
cairo_save(ct);
}
}
void save() {
if (!saved) {
cairo_save(ct);
saved = true;
}
}
~CairoSave() {
if (saved)
}
bool saved;
};
/** @brief Cairo context with Inkscape-specific operations */
};
} // namespace Inkscape
#endif
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :