painting bitmaps onto a PDF surface
"Ratner, Logan" <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <7534b818dc5d4e98b4fc8969cb34b4ca@BY2PR07MB092.namprd07.prod.outlook.com> |
Hello, I am using Cairomm to create some images. I am trying to paint an ImageSurface onto a device surface, having written data into the surface. I'm doing this two ways, either by setting the ImageSurface as the source directly, or by creating a SurfacePattern from the ImageSurface. The image has two colors, one of which has an alpha of 0. Either way works fine if I use a PNG device surface, but if I try the exact same thing with a PDF device surface, the "invisible" color isn't invisible. As I research this I go back and forth between "this should just work" and "this is impossible" but surely there is a way to do what I need. Here's what I'm trying: RefPtr<ImageSurface> csurf = ImageSurface::create(FORMAT_ARGB32, s.height, s.width); /* code to write the image surface */ RefPtr<SurfacePattern> fillpat = SurfacePattern::create(csurf) fillpat->set_extend(EXTEND_REPEAT); ctx.set_source(fillpat); ctx.paint(); Or: RefPtr<ImageSurface> csurf = ImageSurface::create(FORMAT_ARGB32, s.height, s.width); /* code to write the image surface */ ctx.set_source(meshimage, 0, 0); ctx.paint(); Any help would be much appreciated. Thanks in advance, Logan -- Logan Ratner | Senior Consultant | Bluware Inc. 16285 Park 10 Place Suite 300, Houston, TX 77084 [email protected] | P: 713.335.1524 www.bluware.com | We bring your vision to code. <http://www.fergusonbeauregard.com/> -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo