summaryrefslogtreecommitdiff
path: root/src/images/themedIcon.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-08-19 16:25:31 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-08-19 16:25:31 +0200
commit10af7615316fd91eef61cc66a8ede38a2bff3fdc (patch)
tree0f5731b91e14dc14f0ba6f3394768222f66a31be /src/images/themedIcon.vala
parent0b56dfbf01171226a0bb035afcd13358b6477710 (diff)
Imported Upstream version 0.6.5upstream/0.6.5
Diffstat (limited to 'src/images/themedIcon.vala')
-rw-r--r--src/images/themedIcon.vala8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/images/themedIcon.vala b/src/images/themedIcon.vala
index b7b6f74..9f4ca8a 100644
--- a/src/images/themedIcon.vala
+++ b/src/images/themedIcon.vala
@@ -74,6 +74,7 @@ public class ThemedIcon : Image {
if (layer.layer_type == SliceLayer.Type.ICON) {
ctx.push_group();
+ ctx.translate(layer.x, layer.y);
layer.image.paint_on(ctx);
ctx.set_operator(Cairo.Operator.IN);
@@ -86,6 +87,7 @@ public class ThemedIcon : Image {
}
icon.paint_on(ctx);
+ ctx.translate(-layer.x, -layer.y);
ctx.pop_group_to_source();
ctx.paint();
@@ -93,11 +95,13 @@ public class ThemedIcon : Image {
} else if (layer.layer_type == SliceLayer.Type.CAPTION) {
Image text = new RenderedText(caption, layer.width, layer.height, layer.font, layer.color, Config.global.global_scale);
- ctx.translate(0, layer.position);
+ ctx.translate(layer.x, layer.y);
text.paint_on(ctx);
- ctx.translate(0, -layer.position);
+ ctx.translate(-layer.x, -layer.y);
} else if (layer.layer_type == SliceLayer.Type.FILE) {
+ ctx.translate(layer.x, layer.y);
layer.image.paint_on(ctx);
+ ctx.translate(-layer.x, -layer.y);
}
// colorize the whole layer if neccasary