farolfo wrote:
>
> I'm making a graphic application and I need to draw a pixmap. There is a
> way with gtk# to resize this kind of object ?
>
I have resolve with this function:
public Pixmap StrechScreen(Pixmap InPixmap, ref Gdk.GC GraphicContest)
{
Pixbuf MyPixbuf = Pixbuf.FromDrawable(InPixmap, InPixmap.Colormap,
0, 0, 0, 0, ScreenRectangle.Width, ScreenRectangle.Height);
Pixbuf NewBuffer = new Pixbuf(MyPixbuf.ScaleSimple(SWidth, SHeight,
InterpType.Bilinear), 0, 0, SWidth, SHeight);
Pixmap buffer = new Pixmap(Projector.GdkWindow, SWidth, SHeight);
buffer.DrawPixbuf(GraphicContest, NewBuffer, 0, 0, 0, 0, SWidth,
SHeight, RgbDither.Normal, 0,
0);
return buffer;
}
--
View this message in context:
http://old.nabble.com/Scale-a-pixmap-tp27474898p27547743.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
_______________________________________________
Gtk-sharp-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list