public static void RenderTiled (this Cairo.Context self, Gdk.Pixbuf source, Gdk.Rectangle area, Gdk.Rectangle clip, double opacity = 1) { Gdk.CairoHelper.SetSourcePixbuf (self, source, area.X, area.Y); //NOTE: Mono.Cairo.Context.Pattern returns an object than cannot be safely disposed, so P/Invoke directly var pattern = cairo_get_source (self.Handle); cairo_pattern_set_extend (pattern, CairoExtend.CAIRO_EXTEND_REPEAT); self.Rectangle (clip.ToCairoRect ()); self.Clip (); self.PaintWithAlpha (opacity); self.ResetClip (); }
public static void RenderTiled (this Cairo.Context self, Gdk.Pixbuf source, Gdk.Rectangle area, Gdk.Rectangle clip, double opacity = 1) { Gdk.CairoHelper.SetSourcePixbuf (self, source, area.X, area.Y); cairo_pattern_set_extend (self.Pattern.Pointer, CairoExtend.CAIRO_EXTEND_REPEAT); self.Rectangle (clip.ToCairoRect ()); self.Clip (); self.PaintWithAlpha (opacity); self.ResetClip (); }