gfx/thebes/gfxQPainterSurface.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/thebes/gfxQPainterSurface.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     1.5 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef GFX_QPAINTERSURFACE_H
    1.10 +#define GFX_QPAINTERSURFACE_H
    1.11 +
    1.12 +#include "gfxASurface.h"
    1.13 +#include "gfxImageSurface.h"
    1.14 +
    1.15 +#include "cairo-features.h"
    1.16 +#ifdef CAIRO_HAS_QT_SURFACE
    1.17 +
    1.18 +class QPainter;
    1.19 +class QImage;
    1.20 +
    1.21 +class gfxQPainterSurface : public gfxASurface {
    1.22 +public:
    1.23 +    gfxQPainterSurface(QPainter *painter);
    1.24 +    gfxQPainterSurface(const gfxIntSize& size, gfxImageFormat format);
    1.25 +    gfxQPainterSurface(const gfxIntSize& size, gfxContentType content);
    1.26 +
    1.27 +    gfxQPainterSurface(cairo_surface_t *csurf);
    1.28 +
    1.29 +    virtual ~gfxQPainterSurface();
    1.30 +
    1.31 +    QPainter *GetQPainter() { return mPainter; }
    1.32 +
    1.33 +    QImage *GetQImage();
    1.34 +    already_AddRefed<gfxImageSurface> GetAsImageSurface();
    1.35 +
    1.36 +protected:
    1.37 +    QPainter *mPainter;
    1.38 +};
    1.39 +
    1.40 +#endif
    1.41 +
    1.42 +#endif /* GFX_QPAINTERSURFACE_H */

mercurial