<div dir="ltr">Ohk.<br><br>Use cairo_set_source_rgba(1,0,0,1);<br>and then use cairo_paint();<br><br>I think, this would work. On a sidenote, having a transparent background can give you unexpected background color. I had tried doing the same thing, but eventually settled on having a known background color as compared to having a transparent background. For example, when I had a transparent background, I obtained a black background. Thus, I painted it all in white and then performed my drawings.<br>
<br>I cannot support your guess that BitBlt does not support Alpha values. Because, BitBlt is simply a method to transfer a value of colour. The value of color is calculated at Cairo&#39;s End and rendered at the Display end. Thus, if Alpha values are not supported somewhere, it would be your display and AFAK it cannot be BitBlt part or Cairo part.<br>
<br>Regards<br>Mukul<br><br><div class="gmail_quote">On Sun, Aug 31, 2008 at 2:10 AM, Michael Gurnett <span dir="ltr">&lt;<a href="mailto:gurnett@glocalnet.net">gurnett@glocalnet.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">






<div bgcolor="#ffffff">
<div><font size="2" face="Arial">Tried with&nbsp;</font><font size="2" face="Arial">cairo_paint_with_alpha, but that didn&#39;t seem to work.</font></div>
<div><font size="2" face="Arial"></font>&nbsp;</div>
<div><font size="2" face="Arial"></font>&nbsp;</div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"><div><div></div><div class="Wj3C7c">
  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
  <div style="background: rgb(228, 228, 228) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b> 
  <a title="gurnett@glocalnet.net" href="mailto:gurnett@glocalnet.net" target="_blank">Michael 
  Gurnett</a> </div>
  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="cairo@cairographics.org" href="mailto:cairo@cairographics.org" target="_blank">cairo@cairographics.org</a> </div>

  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Sunday, August 31, 2008 2:27 
  AM</div>
  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> [cairo] problem with 
BitBlt</div>
  <div><br></div>
  <div><font size="2" face="Arial">I have the following bit of code</font></div>
  <div><font size="2" face="Arial"></font>&nbsp;</div>
  <div><font size="2" face="Arial">bckgrnd = new Graphics::TBitmap;<br>&nbsp;&nbsp; 
  bckgrnd-&gt;Width = ClientWidth;<br>&nbsp;&nbsp; bckgrnd-&gt;Height = 
  ClientHeight;<br>&nbsp;HDC 
  hdc;<br>&nbsp;hdc=bckgrnd-&gt;Canvas-&gt;Handle;<br>&nbsp;&nbsp;cairo_pattern_t 
  *pat;<br>&nbsp;cairo_surface_t *surface;<br><br>&nbsp;surface = 
  cairo_win32_surface_create (hdc);<br>&nbsp;background = cairo_create 
  (surface);</font></div>
  <div><font size="2" face="Arial"></font>&nbsp;</div>
  <div><font size="2" face="Arial">....</font></div>
  <div><font size="2" face="Arial"></font>&nbsp;</div>
  <div><font size="2" face="Arial"></font>&nbsp;</div>
  <div><font size="2" face="Arial">The idea is the to draw on the background surface 
  and BitBlt it on my paint routine. However, with the code above it appears 
  that the initial drawing space is filled white (guessing rgba are all 1). Is 
  there a way to get the initial drawing region to be 
  transparant.&nbsp;</font></div>
  <div><font size="2" face="Arial"></font>&nbsp;</div>
  <div><font size="2" face="Arial">Thanks</font></div>
  <div><font size="2" face="Arial"></font>&nbsp;</div>
  <div><font size="2" face="Arial">Michael</font></div>
  </div></div><p>
  </p><hr><div class="Ih2E3d">

  <p></p>_______________________________________________<br>cairo mailing 
  list<br><a href="mailto:cairo@cairographics.org" target="_blank">cairo@cairographics.org</a><br><a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a></div>
</blockquote></div>
<br>_______________________________________________<br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
<a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br></blockquote></div><br><br clear="all"><br>-- <br>Thanks and Regards,<br><br>Mukul Sharma<br>
Centre for High Performance Embedded Systems<br>Nanyang Technological University, Singapore<br><br>&quot;A person who runs from responsibilities, runs from life.&quot;<br><br>"It is easy to hate and it is difficult to love. This is how the whole scheme of things works. All good things are difficult to achieve; and bad things are very easy to get."<br>

</div>