[cairo] problem with BitBlt
elitecoder.mukul at gmail.com
Sat Aug 30 17:43:49 PDT 2008
An easy way to make the initial screen transparent could be to paint it all
in any color with transparency set to 100%.
I had faced a similar problem earlier in my project. What I did was, painted
a rectangle of white color with the required dimensions and painted the rest
of the drawings over it.
You can do the same with transparency set to 100% (as in setting 'a' part in
rgba to 1).
I hope it helps.
On Sat, Aug 30, 2008 at 5:27 PM, Michael Gurnett <gurnett at glocalnet.net>wrote:
> I have the following bit of code
> bckgrnd = new Graphics::TBitmap;
> bckgrnd->Width = ClientWidth;
> bckgrnd->Height = ClientHeight;
> HDC hdc;
> cairo_pattern_t *pat;
> cairo_surface_t *surface;
> surface = cairo_win32_surface_create (hdc);
> background = cairo_create (surface);
> 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.
> cairo mailing list
> cairo at cairographics.org
Thanks and Regards,
Centre for High Performance Embedded Systems
Nanyang Technological University, Singapore
"A person who runs from responsibilities, runs from life."
"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."
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo