[cairo] Weird fill vs stroke behavior on Windows

Travis Griggs tgriggs at cincom.com
Mon Mar 30 10:48:24 PDT 2009


I have a segment of code which creates a cr on a Windows HDC from an  
hBitmap. I then draw to it using the following series of (pseudo)  
statements:

  rectangle(0, 0, 100, 100);
  sourceRGBA(0.5, 0.5, 0.5, 1);
  fill();
  sourceRGB(0.625, 0, 0.875);
  moveTo(0, 0);
  lineTo(40, 30);
  strokeWidth(1);
  stroke();

When I look at the bitmap bits though, it's weird. Wherever the stroke  
is at, I get a non-zero alpha component. But wherever the fill is not  
covered by the stroke, I get the color components set, but a zero  
alpha component. The picture it's supposed to draw (and does display  
because the viewer I'm using ignores the alpha channel) is in the  
screen capture below. The bytes associated with it are printed on the  
right, one can see in the series of quadlets, what I'm describing.

This is using 1.8.0, so maybe it's a known bug that's been fixed since?

--
Travis Griggs
Objologist
Light travels faster than sound. This is why some people appear bright  
until you hear them speak...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 2.png
Type: image/png
Size: 13648 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20090330/6bf69bf0/attachment-0001.png 
-------------- next part --------------




More information about the cairo mailing list