Flutter Engine
The Flutter Engine
|
#include "src/pdf/SkPDFShader.h"
#include "include/core/SkData.h"
#include "include/core/SkScalar.h"
#include "include/core/SkStream.h"
#include "include/core/SkSurface.h"
#include "include/core/SkTileMode.h"
#include "include/docs/SkPDFDocument.h"
#include "include/private/base/SkMath.h"
#include "include/private/base/SkTPin.h"
#include "include/private/base/SkTemplates.h"
#include "src/pdf/SkPDFDevice.h"
#include "src/pdf/SkPDFDocumentPriv.h"
#include "src/pdf/SkPDFFormXObject.h"
#include "src/pdf/SkPDFGradientShader.h"
#include "src/pdf/SkPDFGraphicState.h"
#include "src/pdf/SkPDFResourceDict.h"
#include "src/pdf/SkPDFUtils.h"
Go to the source code of this file.
Functions | |
static void | draw (SkCanvas *canvas, const SkImage *image, SkColor4f paintColor) |
static SkBitmap | to_bitmap (const SkImage *image) |
static void | draw_matrix (SkCanvas *canvas, const SkImage *image, const SkMatrix &matrix, SkColor4f paintColor) |
static void | draw_bitmap_matrix (SkCanvas *canvas, const SkBitmap &bm, const SkMatrix &matrix, SkColor4f paintColor) |
static void | fill_color_from_bitmap (SkCanvas *canvas, float left, float top, float right, float bottom, const SkBitmap &bitmap, int x, int y, float alpha) |
static SkMatrix | scale_translate (SkScalar sx, SkScalar sy, SkScalar tx, SkScalar ty) |
static bool | is_tiled (SkTileMode m) |
static SkPDFIndirectReference | make_image_shader (SkPDFDocument *doc, SkMatrix finalMatrix, SkTileMode tileModesX, SkTileMode tileModesY, SkRect bBox, const SkImage *image, SkColor4f paintColor) |
static SkPDFIndirectReference | make_fallback_shader (SkPDFDocument *doc, SkShader *shader, const SkMatrix &canvasTransform, const SkIRect &surfaceBBox, SkColor4f paintColor) |
static SkColor4f | adjust_color (SkShader *shader, SkColor4f paintColor) |
SkPDFIndirectReference | SkPDFMakeShader (SkPDFDocument *doc, SkShader *shader, const SkMatrix &canvasTransform, const SkIRect &surfaceBBox, SkColor4f paintColor) |
Definition at line 316 of file SkPDFShader.cpp.
Definition at line 27 of file SkPDFShader.cpp.
|
static |
Definition at line 48 of file SkPDFShader.cpp.
|
static |
Definition at line 41 of file SkPDFShader.cpp.
|
static |
Definition at line 56 of file SkPDFShader.cpp.
|
static |
Definition at line 73 of file SkPDFShader.cpp.
|
static |
Definition at line 264 of file SkPDFShader.cpp.
|
static |
Definition at line 75 of file SkPDFShader.cpp.
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 325 of file SkPDFShader.cpp.
Definition at line 32 of file SkPDFShader.cpp.