2017-10-27 20:33:53 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2008-09-11 04:24:16 +04:00
|
|
|
|
2020-07-15 02:40:05 +03:00
|
|
|
#ifndef LAYOUT_SVG_SVGFILTERPAINTCALLBACK_H_
|
|
|
|
#define LAYOUT_SVG_SVGFILTERPAINTCALLBACK_H_
|
2008-09-11 04:24:16 +04:00
|
|
|
|
2015-04-21 18:04:57 +03:00
|
|
|
#include "nsRect.h"
|
|
|
|
|
2008-09-11 04:24:16 +04:00
|
|
|
class nsIFrame;
|
2014-10-31 23:08:54 +03:00
|
|
|
class gfxContext;
|
2008-09-11 04:24:16 +04:00
|
|
|
|
2020-06-30 21:11:50 +03:00
|
|
|
namespace mozilla {
|
|
|
|
|
|
|
|
class SVGFilterPaintCallback {
|
2008-09-11 04:24:16 +04:00
|
|
|
public:
|
2020-07-15 13:37:55 +03:00
|
|
|
using imgDrawingParams = image::imgDrawingParams;
|
2016-07-14 07:47:06 +03:00
|
|
|
|
2008-09-11 04:24:16 +04:00
|
|
|
/**
|
2008-10-16 11:55:10 +04:00
|
|
|
* Paint the frame contents.
|
2008-09-11 04:24:16 +04:00
|
|
|
* SVG frames will have had matrix propagation set to false already.
|
2008-10-16 11:55:10 +04:00
|
|
|
* Non-SVG frames have to do their own thing.
|
2008-09-11 04:24:16 +04:00
|
|
|
* The caller will do a Save()/Restore() as necessary so feel free
|
|
|
|
* to mess with context state.
|
2008-10-16 11:55:10 +04:00
|
|
|
* The context will be configured to use the "user space" coordinate
|
|
|
|
* system.
|
2008-09-11 04:24:16 +04:00
|
|
|
* @param aDirtyRect the dirty rect *in user space pixels*
|
2013-09-11 11:27:45 +04:00
|
|
|
* @param aTransformRoot the outermost frame whose transform should be taken
|
|
|
|
* into account when painting an SVG glyph
|
2008-09-11 04:24:16 +04:00
|
|
|
*/
|
2017-05-18 23:03:41 +03:00
|
|
|
virtual void Paint(gfxContext& aContext, nsIFrame* aTarget,
|
|
|
|
const gfxMatrix& aTransform, const nsIntRect* aDirtyRect,
|
|
|
|
imgDrawingParams& aImgParams) = 0;
|
2008-09-11 04:24:16 +04:00
|
|
|
};
|
|
|
|
|
2020-06-30 21:11:50 +03:00
|
|
|
} // namespace mozilla
|
|
|
|
|
2020-07-15 02:40:05 +03:00
|
|
|
#endif // LAYOUT_SVG_SVGFILTERPAINTCALLBACK_H_
|