1Gtk2::Gdk::Pixbuf::DrawU:s:eCracChoen(t3r)ibuted Perl DoGctukm2e:n:tGadtki:o:nPixbuf::Draw::Cache(3)
2
3
4
6 Gtk2::Gdk::Pixbuf::Draw::Cache - Cache for drawing scaled pixbufs
7
9 Gtk2::Gdk::Pixbuf::Draw::Cache provides a cache that should be used by
10 the Gtk2::ImageView::Tool when redrawing the Gtk2::ImageView.
11
13 Glib::Boxed
14 +----Gtk2::Gdk::Pixbuf::Draw::Cache
15
17 cache = Gtk2::Gdk::Pixbuf::Draw::Cache->new
18 Returns a new pixbuf draw cache.
19
20 $cache->draw ($opts, $drawable)
21 · $opts (Gtk2::Gdk::Pixbuf::Draw::Opts)
22
23 · $drawable (Gtk2::Gdk::Drawable)
24
25 Redraws the area specified in the pixbuf draw options in an efficient
26 way by using caching.
27
28 cache : a GdkPixbufDrawCache
29 opts : the Gtk2::Gdk::Pixbuf::Draw::Opts to use in this draw
30 drawable : a GdkDrawable to draw on
31
32 $cache->free
33 Deallocates a pixbuf draw cache and all its data.
34
35 $cache->invalidate
36 Force the pixbuf draw cache to scale the pixbuf at the next draw.
37
38 Gtk2::Gdk::Pixbuf::Draw::Cache tries to minimize the number of scale
39 operations needed by caching the last drawn pixbuf. It would be
40 inefficient to check the individual pixels inside the pixbuf so it
41 assumes that if the memory address of the pixbuf has not changed, then
42 the cache is good to use.
43
44 However, when the image data is modified, this assumtion breaks, which
45 is why this method must be used to tell draw cache about it.
46
47 method = Gtk2::Gdk::Pixbuf::Draw::Cache->get_method ($old, $new)
48 · $old (Gtk2::Gdk::Pixbuf::Draw::Opts)
49
50 · $new (Gtk2::Gdk::Pixbuf::Draw::Opts)
51
52 Gets the fastest method to draw the specified draw options. old is
53 assumed to be the last PixbufDrawOpts used and new is the one to use
54 this time.
55
57 enum Gtk2::Gdk::Pixbuf::Draw::Method
58 · 'scale' / 'GDK_PIXBUF_DRAW_METHOD_SCALE'
59
60 · 'contains' / 'GDK_PIXBUF_DRAW_METHOD_CONTAINS'
61
62 · 'scroll' / 'GDK_PIXBUF_DRAW_METHOD_SCROLL'
63
65 Gtk2::ImageView, Glib::Boxed
66
68 Copyright (C) 2007 by Jeffrey Ratcliffe.
69
70 This software is licensed under the GPL-3; see Gtk2::ImageView for a
71 full notice.
72
73
74
75perl v5.32.0 2020-07-28 Gtk2::Gdk::Pixbuf::Draw::Cache(3)