no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / image / SVGDrawingCallback.h
blobea06fbc64f303ff56a72ae148896bf5740e4b6f0
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_image_SVGDrawingCallback_h
7 #define mozilla_image_SVGDrawingCallback_h
9 #include "gfxDrawable.h"
10 #include "mozilla/gfx/Point.h"
11 #include "mozilla/gfx/Types.h"
13 namespace mozilla {
14 namespace image {
15 class SVGDocumentWrapper;
17 class SVGDrawingCallback final : public gfxDrawingCallback {
18 public:
19 SVGDrawingCallback(SVGDocumentWrapper* aSVGDocumentWrapper,
20 const gfx::IntSize& aViewportSize,
21 const gfx::IntSize& aSize, uint32_t aImageFlags);
23 ~SVGDrawingCallback();
25 bool operator()(gfxContext* aContext, const gfxRect& aFillRect,
26 const gfx::SamplingFilter aSamplingFilter,
27 const gfxMatrix& aTransform) override;
29 private:
30 RefPtr<SVGDocumentWrapper> mSVGDocumentWrapper;
31 const gfx::IntSize mViewportSize;
32 const gfx::IntSize mSize;
33 uint32_t mImageFlags;
36 } // namespace image
37 } // namespace mozilla
39 #endif // mozilla_image_SVGDrawingCallback_h