compositing?



i've noticed a strange behaviour of Gtk::Gdk::Pixmap->composite(); when i try

      $src->composite($dest,
                      0, 0, $dest->get_width(), $dest->get_height(),
                      0, 0, 1, 1,
                      0, 127);

only the alpha channel is taken from $src, all pixel values are #000000. when
i change the penultimate argument (which is GdkInterpType interp_type) to 1,
it works fine. GdkInterpType is an enum with values GDK_INTERP_NEAREST,
GDK_INTERP_TILES, GDK_INTERP_BILINEAR and GDK_INTERP_HYPER, from which i
deduce that GDK_INTERP_NEAREST should be value 0. this is mentioned to be the
fastest scaling method, and since i'm not scaling at all i do not want any of
the other methods, which might not be optimized for not scaling, who knows.

lanzz
--
$_=q<$_=q<,>;s/,/$_/;print;>;s/,/$_/;




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]