diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2010-11-16 10:30:10 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2010-11-16 10:30:10 +0100 |
commit | d31d420f597fc0dc8e6ff6a14070b6bcb8213f08 (patch) | |
tree | a7f805e1d73294e952de1be36ec7946b85c80bef | |
parent | 8f2dad4ead577a037996deaa8638a23a502fa866 (diff) | |
download | logdiag-d31d420f597fc0dc8e6ff6a14070b6bcb8213f08.tar.gz logdiag-d31d420f597fc0dc8e6ff6a14070b6bcb8213f08.tar.xz logdiag-d31d420f597fc0dc8e6ff6a14070b6bcb8213f08.zip |
Symbols are required to save cairo state.
-rw-r--r-- | src/ld-lua-symbol.c | 3 | ||||
-rw-r--r-- | src/ld-symbol.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ld-lua-symbol.c b/src/ld-lua-symbol.c index 363c5cd..42fb31b 100644 --- a/src/ld-lua-symbol.c +++ b/src/ld-lua-symbol.c @@ -121,6 +121,9 @@ ld_lua_symbol_draw (LdSymbol *symbol, cairo_t *cr) g_return_if_fail (cr != NULL); self = LD_LUA_SYMBOL (symbol); + + cairo_save (cr); ld_lua_private_draw (self->priv->lua, self, cr); + cairo_restore (cr); } diff --git a/src/ld-symbol.c b/src/ld-symbol.c index 42c01cd..5919b8e 100644 --- a/src/ld-symbol.c +++ b/src/ld-symbol.c @@ -73,6 +73,9 @@ ld_symbol_area_get_type (void) * * #LdSymbol represents a symbol in the #LdDocument that is in turn * drawn onto the #LdCanvas. + * + * All implementations of this abstract class are required to use + * cairo_save() and cairo_restore() when drawing to store the state. */ G_DEFINE_ABSTRACT_TYPE (LdSymbol, ld_symbol, G_TYPE_OBJECT); |