gfxQPainterSurface::gfxQPainterSurface(const gfxIntSize& size, gfxImageFormat format)
{
    cairo_surface_t *csurf = cairo_qt_surface_create_with_qimage ((cairo_format_t) format,
                                                                        size.width,
                                                                        size.height);
    mPainter = cairo_qt_surface_get_qpainter (csurf);

    Init (csurf);
}
gfxQPainterSurface::gfxQPainterSurface(const gfxIntSize& size, gfxContentType content)
{
    cairo_surface_t *csurf = cairo_qt_surface_create_with_qpixmap ((cairo_content_t) content,
                                                                         size.width,
                                                                         size.height);
    mPainter = cairo_qt_surface_get_qpainter (csurf);

    Init (csurf);
}
Пример #3
0
gfxQPainterSurface::gfxQPainterSurface(const mozilla::gfx::IntSize& size, gfxImageFormat format)
{
    cairo_format_t cformat = GfxFormatToCairoFormat(format);
    cairo_surface_t *csurf =
        cairo_qt_surface_create_with_qimage(cformat, size.width, size.height);
    mPainter = cairo_qt_surface_get_qpainter (csurf);

    Init (csurf);
}
gfxQPainterSurface::gfxQPainterSurface(cairo_surface_t *csurf)
{
    mPainter = cairo_qt_surface_get_qpainter (csurf);

    Init(csurf, PR_TRUE);
}