summaryrefslogtreecommitdiff
path: root/src/util/image.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-06-28 21:35:52 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-06-28 21:35:52 +0200
commitb86540b743f1a87a163ffb811c8fe22a01fefa38 (patch)
treeb47cb3bb83c2377234226fb3987ab3320a987dd9 /src/util/image.vala
parentac6e0b731b9f0b2efd392e3309a5c07e2a66adad (diff)
parente905d8e16eec152d19797937f13ba3cf4b8f8aca (diff)
Merge branch 'release/debian/0.32.1-1'debian/0.32.1-1
Diffstat (limited to 'src/util/image.vala')
-rw-r--r--src/util/image.vala8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/util/image.vala b/src/util/image.vala
index 0a30339..95ac998 100644
--- a/src/util/image.vala
+++ b/src/util/image.vala
@@ -343,7 +343,7 @@ private Cairo.Surface get_background_surface() {
string color_b;
var config = Config.Facade.get_instance();
- var type = config.get_transparent_background_type();
+ var type = "checkered"; //config.get_transparent_background_type();
switch (type) {
case "checkered":
color_a = "#808080";
@@ -386,7 +386,8 @@ public void paint_pixmap_with_background (Cairo.Context ctx, Gdk.Pixbuf pixbuf,
}
Gdk.cairo_set_source_pixbuf(ctx, pixbuf, x, y);
- ctx.paint();
+ ctx.rectangle(x, y, pixbuf.width , pixbuf.height);
+ ctx.fill();
}
// Force an axially-aligned box to be inside a rotated rectangle.
@@ -422,3 +423,6 @@ Box clamp_inside_rotated_image(Box src, int img_w, int img_h, double angle_deg,
src.right + right_offset, src.bottom + bottom_offset);
}
+double degrees_to_radians(double theta) {
+ return (theta * (GLib.Math.PI / 180.0));
+}