+wxString wxBrushString(wxColour c, int style = wxBRUSHSTYLE_SOLID)
+{
+ wxString s = wxT("fill:") + c.GetAsString(wxC2S_HTML_SYNTAX) + wxT("; ");
+ // Use the color's alpha value (if not opaque) for the opacity.
+ // Note that a transparent brush will override the alpha value.
+ if (c.Alpha() != wxALPHA_OPAQUE && style != wxBRUSHSTYLE_TRANSPARENT)
+ {
+ s += wxString::Format(wxT("fill-opacity:%s; "), NumStr(c.Alpha()/255.));
+ }
+ else
+ {
+ switch ( style )
+ {
+ case wxBRUSHSTYLE_SOLID:
+ s += wxT("fill-opacity:1.0; ");
+ break;
+ case wxBRUSHSTYLE_TRANSPARENT:
+ s += wxT("fill-opacity:0.0; ");
+ break;
+ default :
+ wxASSERT_MSG(false, wxT("wxSVGFileDC::Requested Brush Style not available"));
+ }