GraphicsContext::GraphicsContext(PlatformGraphicsContext* cr) : m_common(createGraphicsContextPrivate()) , m_data(new GraphicsContextPlatformPrivate) { m_data->cr = cairo_reference(cr); setPaintingDisabled(!cr); }
void GraphicsContext::platformInit(PlatformGraphicsContext* gc) { if (gc) gc->setGraphicsContext(this); m_data = new GraphicsContextPlatformPrivate(gc); setPaintingDisabled(!gc || gc->isPaintingDisabled()); }
void GraphicsContext::platformInit(PlatformContextCairo* platformContext) { m_data = new GraphicsContextPlatformPrivate(platformContext); if (platformContext) m_data->syncContext(platformContext->cr()); else setPaintingDisabled(true); }
// This may be called with a NULL pointer to create a graphics context that has // no painting. void GraphicsContext::platformInit(PlatformGraphicsContext* gc) { if (gc) gc->setGraphicsContext(this); // the caller owns the gc m_data = gc; setPaintingDisabled(!gc || !gc->canvas()); }
void GraphicsContext::platformInit(CGContextRef cgContext) { m_data = new GraphicsContextPlatformPrivate(cgContext); setPaintingDisabled(!cgContext); if (cgContext) { // Make sure the context starts in sync with our state. setPlatformFillColor(fillColor(), fillColorSpace()); setPlatformStrokeColor(strokeColor(), strokeColorSpace()); } }
void GraphicsContext::platformReInit(PlatformGraphicsContext* pgc) { if(m_data && pgc) { delete m_data; pgc->setGraphicsContext(this); m_data = new GraphicsContextPlatformPrivate(pgc); setPaintingDisabled(pgc->isPaintingDisabled()); } }
GraphicsContext::GraphicsContext(CGContextRef cgContext) : m_common(createGraphicsContextPrivate()) , m_data(new GraphicsContextPlatformPrivate(cgContext)) { setPaintingDisabled(!cgContext); if (cgContext) { // Make sure the context starts in sync with our state. setPlatformFillColor(fillColor()); setPlatformStrokeColor(strokeColor()); } }
void GraphicsContext::platformInit(HDC hdc, bool hasAlpha) { m_data = new GraphicsContextPlatformPrivate(CGContextWithHDC(hdc, hasAlpha)); CGContextRelease(m_data->m_cgContext.get()); m_data->m_hdc = hdc; setPaintingDisabled(!m_data->m_cgContext); if (m_data->m_cgContext) { // Make sure the context starts in sync with our state. setPlatformFillColor(fillColor(), ColorSpaceDeviceRGB); setPlatformStrokeColor(strokeColor(), ColorSpaceDeviceRGB); } }
GraphicsContext::GraphicsContext(HDC dc) : m_common(createGraphicsContextPrivate()) , m_data(new GraphicsContextPlatformPrivate) { if (dc) { cairo_surface_t* surface = cairo_win32_surface_create(dc); m_data->cr = cairo_create(surface); } else { setPaintingDisabled(true); m_data->cr = 0; } }
GraphicsContext::GraphicsContext(HDC hdc, bool hasAlpha) : m_common(createGraphicsContextPrivate()) , m_data(new GraphicsContextPlatformPrivate(CGContextWithHDC(hdc, hasAlpha))) { CGContextRelease(m_data->m_cgContext); m_data->m_hdc = hdc; setPaintingDisabled(!m_data->m_cgContext); if (m_data->m_cgContext) { // Make sure the context starts in sync with our state. setPlatformFillColor(fillColor()); setPlatformStrokeColor(strokeColor()); } }
GraphicsContext::GraphicsContext(PlatformGraphicsContext* context) : m_common(createGraphicsContextPrivate()) , m_data(new GraphicsContextPlatformPrivate) { setPaintingDisabled(!context); if (context) { // Make sure the context starts in sync with our state. setPlatformFillColor(fillColor(), DeviceColorSpace); setPlatformStrokeColor(strokeColor(), DeviceColorSpace); } #if USE(WXGC) m_data->context = (wxGCDC*)context; #else m_data->context = (wxWindowDC*)context; #endif }
void GraphicsContext::platformInit(HDC dc, bool hasAlpha) { cairo_t* cr = 0; if (dc) cr = createCairoContextWithHDC(dc, hasAlpha); else setPaintingDisabled(true); m_data = new GraphicsContextPlatformPrivateToplevel(new PlatformContextCairo(cr)); m_data->m_hdc = dc; if (platformContext()->cr()) { // Make sure the context starts in sync with our state. setPlatformFillColor(fillColor(), fillColorSpace()); setPlatformStrokeColor(strokeColor(), strokeColorSpace()); } }
void GraphicsContext::platformInit(PlatformGraphicsContext* context) { m_data = new GraphicsContextPlatformPrivate; setPaintingDisabled(!context); if (context) { // Make sure the context starts in sync with our state. setPlatformFillColor(fillColor(), ColorSpaceDeviceRGB); setPlatformStrokeColor(strokeColor(), ColorSpaceDeviceRGB); } #if USE(WXGC) m_data->context = (wxGCDC*)context; #else m_data->context = (wxWindowDC*)context; #endif }
GraphicsContext::GraphicsContext(HDC dc, bool hasAlpha) : m_common(createGraphicsContextPrivate()) , m_data(new GraphicsContextPlatformPrivate) { if (dc) { cairo_surface_t* surface = cairo_win32_surface_create(dc); m_data->cr = cairo_create(surface); m_data->m_hdc = dc; } else { setPaintingDisabled(true); m_data->cr = 0; m_data->m_hdc = 0; } if (m_data->cr) { // Make sure the context starts in sync with our state. setPlatformFillColor(fillColor()); setPlatformStrokeColor(strokeColor()); } }
void GraphicsContext::setUpdatingControlTints(bool b) { setPaintingDisabled(b); m_updatingControlTints = b; }
void GraphicsContext::platformInit(SurfaceOpenVG* surface) { m_data = surface ? new GraphicsContextPlatformPrivate(surface) : 0; setPaintingDisabled(!surface); }
void GraphicsContext::platformInit(PlatformGraphicsContext* context) { m_data = new GraphicsContextPlatformPrivate(context); setPaintingDisabled(!context); }
GraphicsContext::GraphicsContext(PlatformGraphicsContext* context) : m_common(createGraphicsContextPrivate()) , m_data(new GraphicsContextPlatformPrivate(context)) { setPaintingDisabled(!context); }
// This may be called with a NULL pointer to create a graphics context that has // no painting. GraphicsContext::GraphicsContext(PlatformGraphicsContext* gc) : m_common(createGraphicsContextPrivate()) , m_data(new GraphicsContextPlatformPrivate(gc)) { setPaintingDisabled(!gc || !platformContext()->canvas()); }