Flutter Engine
The Flutter Engine
|
#include "src/pdf/SkPDFShader.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkImage.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkPaint.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkSamplingOptions.h"
#include "include/core/SkScalar.h"
#include "include/core/SkShader.h"
#include "include/core/SkSize.h"
#include "include/core/SkStream.h"
#include "include/core/SkSurface.h"
#include "include/core/SkTileMode.h"
#include "include/private/base/SkTPin.h"
#include "src/core/SkDevice.h"
#include "src/core/SkTHash.h"
#include "src/pdf/SkKeyedImage.h"
#include "src/pdf/SkPDFDevice.h"
#include "src/pdf/SkPDFDocumentPriv.h"
#include "src/pdf/SkPDFGradientShader.h"
#include "src/pdf/SkPDFUtils.h"
#include "src/shaders/SkShaderBase.h"
#include <memory>
#include <utility>
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 325 of file SkPDFShader.cpp.
Definition at line 36 of file SkPDFShader.cpp.
|
static |
Definition at line 57 of file SkPDFShader.cpp.
|
static |
Definition at line 50 of file SkPDFShader.cpp.
|
static |
Definition at line 65 of file SkPDFShader.cpp.
|
static |
Definition at line 82 of file SkPDFShader.cpp.
|
static |
Definition at line 273 of file SkPDFShader.cpp.
|
static |
Definition at line 84 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 334 of file SkPDFShader.cpp.
Definition at line 41 of file SkPDFShader.cpp.