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"
15 class SVGDocumentWrapper
;
17 class SVGDrawingCallback final
: public gfxDrawingCallback
{
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
;
30 RefPtr
<SVGDocumentWrapper
> mSVGDocumentWrapper
;
31 const gfx::IntSize mViewportSize
;
32 const gfx::IntSize mSize
;
37 } // namespace mozilla
39 #endif // mozilla_image_SVGDrawingCallback_h