[cairo] Problem with alpha-channel (Visual Studio)
razvan gradinaru
razvan842002 at yahoo.com
Thu Jan 5 21:43:53 UTC 2017
Hi all,
I need some help from you: I have created a alpha-channel surface, then I render an SVG image (using librsvg) but on the screen appear a black halo around my image, and I don't know why. I have attached an image with final result from the screen. This is my code:
void PaintSVG(HDC hdc, long width, long height)
{
cairo_surface_t *surface = cairo_win32_surface_create_with_dib(CAIRO_FORMAT_ARGB32, width, height);
cairo_t* cr = cairo_create(surface);
rsvg_handle_render_cairo(my_svg_handle, cr);
HDC src = cairo_win32_surface_get_dc(surface);
BitBlt(hdc, 0, 0, width, height, src, 0, 0, SRCCOPY);
cairo_destroy(cr);
cairo_surface_destroy(surface);
}
Is there something wrong with my code?
Thank you very much!
RG.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alpha.jpg
Type: image/pjpeg
Size: 14962 bytes
Desc: not available
URL: <https://lists.cairographics.org/archives/cairo/attachments/20170105/22262ec5/attachment.bin>
More information about the cairo
mailing list