gfx/thebes/gfxTeeSurface.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/thebes/gfxTeeSurface.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,37 @@
     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_TEESURFACE_H
    1.10 +#define GFX_TEESURFACE_H
    1.11 +
    1.12 +#include "gfxASurface.h"
    1.13 +#include "nsTArrayForwardDeclare.h"
    1.14 +#include "nsSize.h"
    1.15 +
    1.16 +template<class T> class nsRefPtr;
    1.17 +
    1.18 +/**
    1.19 + * Wraps a cairo_tee_surface. The first surface in the surface list is the
    1.20 + * primary surface, which answers all surface queries (including size).
    1.21 + * All drawing is performed on all the surfaces.
    1.22 + *
    1.23 + * The device transform of a tee surface is applied before drawing to the
    1.24 + * underlying surfaces --- which also applies the device transforms of the
    1.25 + * underlying surfaces.
    1.26 + */
    1.27 +class gfxTeeSurface : public gfxASurface {
    1.28 +public:
    1.29 +    gfxTeeSurface(cairo_surface_t *csurf);
    1.30 +    gfxTeeSurface(gfxASurface **aSurfaces, int32_t aSurfaceCount);
    1.31 +
    1.32 +    virtual const gfxIntSize GetSize() const;
    1.33 +
    1.34 +    /**
    1.35 +     * Returns the list of underlying surfaces.
    1.36 +     */
    1.37 +    void GetSurfaces(nsTArray<nsRefPtr<gfxASurface> > *aSurfaces);
    1.38 +};
    1.39 +
    1.40 +#endif /* GFX_TEESURFACE_H */

mercurial