Page 1 of 1

wxPDF using wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE

Posted: Tue May 23, 2017 1:33 pm
by ees
Hello,
Is it a known issue in wxPDF that the wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE flag is not working? The results to the display in my application are correct, but the objects in the PDF are always solid fill, as if it is always using wxBRUSHSTYLE_SOLID. The dc in the following code is a wxPdfDC when writing a pdf.

Code: Select all

wxPen pen = dc->GetPen();
pen.SetStyle( wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE );
wxBrush brush = dc->GetBrush();
brush.SetStyle( wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE );


Thanks,

Ed

Re: wxPDF using wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE

Posted: Tue May 23, 2017 9:25 pm
by utelle
ees wrote:Is it a known issue in wxPDF that the wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE flag is not working? The results to the display in my application are correct, but the objects in the PDF are always solid fill, as if it is always using wxBRUSHSTYLE_SOLID. The dc in the following code is a wxPdfDC when writing a pdf.

Code: Select all

wxPen pen = dc->GetPen();
pen.SetStyle( wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE );
wxBrush brush = dc->GetBrush();
brush.SetStyle( wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE );

Just as a side note: for setting the pen style you should use wxPenStyle values.

Unfortunately wxPdfDC currently only supports solid brush styles. That is, only the color attribute of a brush is used to set the PDF fill color.

wxPdfDocument itself supports various line and fill types including bitmap patterns. However, stencil masking (PDF equivalent of wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE) is currently not supported.

At the moment I have no plans to add stencil masking myself, but contributions are welcome, of course.

Regards,

Ulrich

Re: wxPDF using wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE

Posted: Wed May 24, 2017 12:44 pm
by ees
Thanks Ulrich.

Ed