wxPDF using wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
ees
In need of some credit
In need of some credit
Posts: 7
Joined: Mon May 22, 2017 7:37 pm

wxPDF using wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE

Post 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
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxPDF using wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE

Post 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
ees
In need of some credit
In need of some credit
Posts: 7
Joined: Mon May 22, 2017 7:37 pm

Re: wxPDF using wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE

Post by ees »

Thanks Ulrich.

Ed
Post Reply