diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-06-30 20:45:44 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-06-30 20:45:44 +0200 |
commit | bca1cc8681bbaf662dabc961f84b06adc1255e08 (patch) | |
tree | 9c387fef03143f2f5f809672bf51e6495f874050 /src/page.vala | |
parent | a675d0fb9f307b714d0b9cf19690d2b08b666d7c (diff) | |
parent | 26d8dd51f3ecc4bd6861ed5155acb3090a1983d4 (diff) |
Update upstream source from tag 'upstream/46.0'
Update to upstream version '46.0'
with Debian dir a64ff9f87cc10b162225618b62823763d5ea1d65
Diffstat (limited to 'src/page.vala')
-rw-r--r-- | src/page.vala | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/page.vala b/src/page.vala index cfe70e1..67c8010 100644 --- a/src/page.vala +++ b/src/page.vala @@ -219,6 +219,31 @@ public class Page : Object this.crop_width = (crop_x + crop_width > scan_width) ? scan_width : crop_width; this.crop_height = (crop_y + crop_height > scan_height) ? scan_height : crop_height; } + + public Page copy() + { + var copy = new Page.from_data ( + scan_width, + scan_height, + rowstride, + n_channels, + depth, + dpi, + scan_direction, + color_profile, + pixels, + has_crop, + crop_name, + crop_x, + crop_y, + crop_width, + crop_height + ); + + copy.scan_line = scan_line; + + return copy; + } public void set_page_info (ScanPageInfo info) { @@ -649,10 +674,9 @@ public class Page : Object public void copy_to_clipboard (Gtk.Window window) { - var display = window.get_display (); - var clipboard = Gtk.Clipboard.get_for_display (display, Gdk.SELECTION_CLIPBOARD); + var clipboard = window.get_clipboard(); var image = get_image (true); - clipboard.set_image (image); + clipboard.set_value (image); } public void save_png (File file) throws Error |