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 Glib::Boxed
10 +----Gtk2::Gdk::Pixbuf::Draw::Cache
11
13 Gtk2::Gdk::Pixbuf::Draw::Cache provides a cache that should be used by
14 the Gtk2::ImageView::Tool when redrawing the Gtk2::ImageView.
15
17 cache = Gtk2::Gdk::Pixbuf::Draw::Cache->new
18 Creates a new pixbuf draw cache.
19
20 Returns
21
22 a new Gtk2::Gdk::Pixbuf::Draw::Cache
23
24 $cache->draw ($opts, $drawable)
25 · $opts (Gtk2::Gdk::Pixbuf::Draw::Opts)
26
27 · $drawable (Gtk2::Gdk::Drawable)
28
29 Redraws the area specified in the pixbuf draw options in an
30 efficient way by using caching.
31
32 cache : a GdkPixbufDrawCache
33 opts : the Gtk2::Gdk::Pixbuf::Draw::Opts to use in this draw
34 drawable : a GdkDrawable to draw on
35
36 $cache->free
37 Deallocates a pixbuf draw cache and all its data.
38
39 $cache->invalidate
40 Force the pixbuf draw cache to scale the pixbuf at the next draw.
41
42 Gtk2::Gdk::Pixbuf::Draw::Cache tries to minimize the number of
43 scale operations needed by caching the last drawn pixbuf. It would
44 be inefficient to check the individual pixels inside the pixbuf so
45 it assumes that if the memory address of the pixbuf has not
46 changed, then the cache is good to use.
47
48 However, when the image data is modified, this assumtion breaks,
49 which is why this method must be used to tell draw cache about it.
50
51 method = Gtk2::Gdk::Pixbuf::Draw::Cache->get_method ($old, $new)
52 · $old (Gtk2::Gdk::Pixbuf::Draw::Opts)
53
54 · $new (Gtk2::Gdk::Pixbuf::Draw::Opts)
55
56 Gets the fastest method to draw the specified draw options. old is
57 assumed to be the last PixbufDrawOpts used and new is the one to
58 use this time.
59
60 old : the last draw options used
61 new : the current draw options
62
63 Returns
64
65 the best draw method to use to draw
66
68 enum Gtk2::Gdk::Pixbuf::Draw::Method
69 · 'scale' / 'GDK_PIXBUF_DRAW_METHOD_SCALE'
70
71 · 'contains' / 'GDK_PIXBUF_DRAW_METHOD_CONTAINS'
72
73 · 'scroll' / 'GDK_PIXBUF_DRAW_METHOD_SCROLL'
74
76 Gtk2::ImageView, Glib::Boxed
77
79 Copyright (C) 2007 by Jeffrey Ratcliffe.
80
81 This software is licensed under the GPL-3; see Gtk2::ImageView for a
82 full notice.
83
85 Hey! The above document had some coding errors, which are explained
86 below:
87
88 Around line 31:
89 You forgot a '=back' before '=head3'
90
91 Around line 40:
92 =back without =over
93
94 Around line 117:
95 You forgot a '=back' before '=head3'
96
97 Around line 126:
98 =back without =over
99
100
101
102perl v5.12.0 2010-05-02 Gtk2::Gdk::Pixbuf::Draw::Cache(3)