tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

SVGDrawingCallback.h (1242B)


      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/. */
      5 
      6 #ifndef mozilla_image_SVGDrawingCallback_h
      7 #define mozilla_image_SVGDrawingCallback_h
      8 
      9 #include "gfxDrawable.h"
     10 #include "mozilla/gfx/Point.h"
     11 #include "mozilla/gfx/Types.h"
     12 
     13 namespace mozilla {
     14 namespace image {
     15 class SVGDocumentWrapper;
     16 
     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);
     22 
     23  ~SVGDrawingCallback();
     24 
     25  bool operator()(gfxContext* aContext, const gfxRect& aFillRect,
     26                  const gfx::SamplingFilter aSamplingFilter,
     27                  const gfxMatrix& aTransform) override;
     28 
     29 private:
     30  RefPtr<SVGDocumentWrapper> mSVGDocumentWrapper;
     31  const gfx::IntSize mViewportSize;
     32  const gfx::IntSize mSize;
     33  uint32_t mImageFlags;
     34 };
     35 
     36 }  // namespace image
     37 }  // namespace mozilla
     38 
     39 #endif  // mozilla_image_SVGDrawingCallback_h