Henning.Ramm@mediapro-gmbh.de writes:
Reid Priedhorsky writes:
>
> I'm drawing into a wx.PostScriptDC, and several of my shapes should be
> transparent, so I use the wx.TRANSPARENT BRUSH. Transparency works fine
> in wx.ClientDC and wx.PaintDC (using the same drawing code), but in
> wx.PostScriptDC these shapes are filled with black. I've tried defining
> my own transparent brush and calling wx.PostScriptDC.SetColour(True),
> both to >no avail.I don't know nothing about wx.PostScriptDC, but PostScript itself knows no
transparency. I'd assume that a PostScript widget can't do anything that
PostScript doesn't support.
Well, in src/generic/dcpsg.cpp, it seems that if brush or pen are
transparent, the corresponding PostScript commands shouldn't be generated:
void wxPostScriptDC::DoDrawRectangle (wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{
wxCHECK_RET( m_ok && m_pstream, wxT("invalid postscript dc") );
if (m_brush.GetStyle () != wxTRANSPARENT)
{
[ ... snip PostScript generation ... ]
}
if (m_pen.GetStyle () != wxTRANSPARENT)
{
[ ... snip PostScript generation ... ]
}
}
So I don't dispute your assessment of PS capabilities, but it seems like the
commands themselves should simply be omitted for transparent shapes???
Reid