michael@0: /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef GFX_QPAINTERSURFACE_H michael@0: #define GFX_QPAINTERSURFACE_H michael@0: michael@0: #include "gfxASurface.h" michael@0: #include "gfxImageSurface.h" michael@0: michael@0: #include "cairo-features.h" michael@0: #ifdef CAIRO_HAS_QT_SURFACE michael@0: michael@0: class QPainter; michael@0: class QImage; michael@0: michael@0: class gfxQPainterSurface : public gfxASurface { michael@0: public: michael@0: gfxQPainterSurface(QPainter *painter); michael@0: gfxQPainterSurface(const gfxIntSize& size, gfxImageFormat format); michael@0: gfxQPainterSurface(const gfxIntSize& size, gfxContentType content); michael@0: michael@0: gfxQPainterSurface(cairo_surface_t *csurf); michael@0: michael@0: virtual ~gfxQPainterSurface(); michael@0: michael@0: QPainter *GetQPainter() { return mPainter; } michael@0: michael@0: QImage *GetQImage(); michael@0: already_AddRefed GetAsImageSurface(); michael@0: michael@0: protected: michael@0: QPainter *mPainter; michael@0: }; michael@0: michael@0: #endif michael@0: michael@0: #endif /* GFX_QPAINTERSURFACE_H */