<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16705" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Why would you want to paint the background red with
and 100% opaque (no transparancy). What you explain later on is the problem I
have. The background colour would not be unexpected if the correct
procedure as used. It is just a question of the correct approach.</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=elitecoder.mukul@gmail.com
href="mailto:elitecoder.mukul@gmail.com">Mukul Sharma</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=gurnett@glocalnet.net
href="mailto:gurnett@glocalnet.net">Michael Gurnett</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=cairo@cairographics.org
href="mailto:cairo@cairographics.org">cairo@cairographics.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Sunday, August 31, 2008 11:23
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [cairo] problem with
BitBlt</DIV>
<DIV><BR></DIV>
<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'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><<A
href="mailto:gurnett@glocalnet.net">gurnett@glocalnet.net</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV bgcolor="#ffffff">
<DIV><FONT face=Arial size=2>Tried with </FONT><FONT face=Arial
size=2>cairo_paint_with_alpha, but that didn't seem to work.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,0) 2px solid; MARGIN-RIGHT: 0px">
<DIV>
<DIV></DIV>
<DIV class=Wj3C7c>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal">-----
Original Message ----- </DIV>
<DIV
style="BACKGROUND: rgb(228,228,228); FONT: 10pt arial; font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><B>From:</B>
<A title=gurnett@glocalnet.net href="mailto:gurnett@glocalnet.net"
target=_blank>Michael Gurnett</A> </DIV>
<DIV
style="FONT: 10pt arial; 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: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Sent:</B>
Sunday, August 31, 2008 2:27 AM</DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Subject:</B>
[cairo] problem with BitBlt</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>I have the following bit of code</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>bckgrnd = new
Graphics::TBitmap;<BR> bckgrnd->Width =
ClientWidth;<BR> bckgrnd->Height =
ClientHeight;<BR> HDC
hdc;<BR> hdc=bckgrnd->Canvas->Handle;<BR> cairo_pattern_t
*pat;<BR> cairo_surface_t *surface;<BR><BR> surface =
cairo_win32_surface_create (hdc);<BR> background = cairo_create
(surface);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>....</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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>"A person who runs from responsibilities, runs from
life."<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></BLOCKQUOTE></BODY></HTML>