<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style style="display: none;" id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body tabindex="0" aria-label="Message body" fpstyle="1" dir="ltr">
<div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif; font-size: 12pt; color: #000000; margin: 0">
Hello,<br>
<br>
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.<br>
<br>
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.<br>
<br>
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.<br>
<br>
Here's what I'm trying:<br>
<br>
RefPtr<ImageSurface> csurf = ImageSurface::create(FORMAT_ARGB32, s.height, s.width);<br>
/* code to write the image surface */<br>
RefPtr<SurfacePattern> fillpat = SurfacePattern::create(csurf)<br>
fillpat->set_extend(EXTEND_REPEAT);<br>
ctx.set_source(fillpat);<br>
ctx.paint();<br>
<br>
Or:<br>
<br>
RefPtr<ImageSurface> csurf = ImageSurface::create(FORMAT_ARGB32, s.height, s.width);<br>
/* code to write the image surface */<br>
ctx.set_source(meshimage, 0, 0);<br>
ctx.paint();<br>
<br>
Any help would be much appreciated.<br>
Thanks in advance,<br>
<br>
Logan<br>
<br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><font color="999999" size="1"><font face="Tahoma">--
<br>
<b>Logan Ratner</b> | S<font color="999999"><font size="1">enior</font></font> Consultant |
<b>Bluware Inc.</b><br>
16285 Park <font color="999999"><font size="1">10</font></font> P<font color="999999"><font size="1">lace</font></font> Suite 300, Houston, TX 77084</font></font><br>
<font color="999999" size="1"><font face="Tahoma"><font color="999999" size="1"><font face="Tahoma">logan.ratner@bluware.com
<font color="999999"><font size="1">| <font color="999999"><font size="1">P</font></font></font></font>: 713<font color="999999"><font size="1">.</font></font>335<font color="999999"><font size="1">.</font></font>1524</font></font><br>
www.bluware.com | We bring your vision to code.<br>
</font><br>
<a target="_blank" href="http://www.fergusonbeauregard.com/" tabindex="0" rel="nofollow"><span style="text-decoration:none"></span></a></font></div>
</div>
</div>
</div>
<br>
</div>
</body>
</html>