Flutter Engine
The Flutter Engine
|
#include "include/core/SkColor.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkRect.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkMacros.h"
#include "src/core/SkChecksum.h"
#include "src/pdf/SkBitmapKey.h"
#include "src/pdf/SkPDFTypes.h"
Go to the source code of this file.
Classes | |
struct | SkPDFImageShaderKey |
Functions | |
SkPDFIndirectReference | SkPDFMakeShader (SkPDFDocument *doc, SkShader *shader, const SkMatrix &ctm, const SkIRect &surfaceBBox, SkColor4f paintColor) |
SK_END_REQUIRE_DENSE bool | operator== (const SkPDFImageShaderKey &a, const SkPDFImageShaderKey &b) |
|
inline |
Definition at line 60 of file SkPDFShader.h.
SkPDFIndirectReference SkPDFMakeShader | ( | SkPDFDocument * | doc, |
SkShader * | shader, | ||
const SkMatrix & | ctm, | ||
const SkIRect & | surfaceBBox, | ||
SkColor4f | paintColor | ||
) |
Make a PDF shader for the passed SkShader. If the SkShader is invalid in some way, returns nullptr.
In PDF parlance, this is a pattern, used in place of a color when the pattern color space is selected.
May cache the shader in the document for later re-use. If this function is called again with an equivalent shader, a new reference to the cached pdf shader may be returned.
doc | The parent document, must be non-null. |
shader | The SkShader to emulate. |
ctm | The current transform matrix. (PDF shaders are absolutely positioned, relative to where the page is drawn.) |
surfaceBBox | The bounding box of the drawing surface (with matrix already applied). |
paintColor | Color+Alpha of the paint. Color is usually ignored, unless it is a alpha shader. |
Definition at line 334 of file SkPDFShader.cpp.