[cairo] How to make stipple pattern as source

Benjamin Otte otte at redhat.com
Fri Aug 20 20:49:29 PDT 2010


http://git.gnome.org/browse/gtk
+/tree/gtk/gtkcolorbutton.c?id=804c80097995bb0026544118a32b59e23ee2fbe3#n241

On Fri, 2010-08-20 at 15:45 -0700, Daniel Goldman wrote:
> Can someone suggest how to make a stipple pattern (or other tiled pattern) as a 
> source? Something like:
> 
> oxoxoxoxox
> xoxoxoxoxo
> oxoxoxoxox
> 
> Or
> 
> ooxxooxx
> xxooxxoo
> ooxxooxx
> 
> After looking around cairo web site a lot, the only thing I saw was 
> cairo_image_surface_create_from_png () with an existing png file with pattern. 
> I'd rather create the pattern from within cairo, but don't know which functions 
> to use. I don't want to reinvent the wheel or do this an inefficient way.
> 
> I write to both pdf and png surfaces.
> 
> Thanks,
> Daniel
> 
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo




More information about the cairo mailing list