return new wxCairoImageContext(this, image);
}
#endif // wxUSE_IMAGE
wxGraphicsContext * wxCairoRenderer::CreateMeasuringContext()
{
return new wxCairoImageContext(this, image);
}
#endif // wxUSE_IMAGE
wxGraphicsContext * wxCairoRenderer::CreateMeasuringContext()
{
wxCairoMatrixData* data = new wxCairoMatrixData( this );
data->Set( a,b,c,d,tx,ty ) ;
m.SetRefData(data);
wxCairoMatrixData* data = new wxCairoMatrixData( this );
data->Set( a,b,c,d,tx,ty ) ;
m.SetRefData(data);
- ENSURE_LOADED_OR_RETURN(wxNullGraphicsPen);
- if ( !pen.IsOk() || pen.GetStyle() == wxPENSTYLE_TRANSPARENT )
- return wxNullGraphicsPen;
- else
+ wxGraphicsPen p;
+ ENSURE_LOADED_OR_RETURN(p);
+ if (pen.IsOk() && pen.GetStyle() != wxPENSTYLE_TRANSPARENT)
- ENSURE_LOADED_OR_RETURN(wxNullGraphicsBrush);
- if ( !brush.IsOk() || brush.GetStyle() == wxBRUSHSTYLE_TRANSPARENT )
- return wxNullGraphicsBrush;
- else
+ wxGraphicsBrush p;
+ ENSURE_LOADED_OR_RETURN(p);
+ if (brush.IsOk() && brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT)
wxDouble x2, wxDouble y2,
const wxGraphicsGradientStops& stops)
{
wxDouble x2, wxDouble y2,
const wxGraphicsGradientStops& stops)
{
wxCairoBrushData* d = new wxCairoBrushData( this );
d->CreateLinearGradientBrush(x1, y1, x2, y2, stops);
p.SetRefData(d);
wxCairoBrushData* d = new wxCairoBrushData( this );
d->CreateLinearGradientBrush(x1, y1, x2, y2, stops);
p.SetRefData(d);
wxDouble xc, wxDouble yc, wxDouble r,
const wxGraphicsGradientStops& stops)
{
wxDouble xc, wxDouble yc, wxDouble r,
const wxGraphicsGradientStops& stops)
{
wxCairoBrushData* d = new wxCairoBrushData( this );
d->CreateRadialGradientBrush(xo, yo, xc, yc, r, stops);
p.SetRefData(d);
wxCairoBrushData* d = new wxCairoBrushData( this );
d->CreateRadialGradientBrush(xo, yo, xc, yc, r, stops);
p.SetRefData(d);
font.SetRefData(new wxCairoFontData(this, sizeInPixels, facename, flags, col));
return font;
}
wxGraphicsBitmap wxCairoRenderer::CreateBitmap( const wxBitmap& bmp )
{
font.SetRefData(new wxCairoFontData(this, sizeInPixels, facename, flags, col));
return font;
}
wxGraphicsBitmap wxCairoRenderer::CreateBitmap( const wxBitmap& bmp )
{