8 #ifndef SkShader_DEFINED
9 #define SkShader_DEFINED
12 #include "SkFilterQuality.h"
13 #include "SkFlattenable.h"
14 #include "SkImageInfo.h"
18 #include "../gpu/GrColor.h"
23 class SkColorSpaceXformer;
27 class SkRasterPipeline;
29 class GrFragmentProcessor;
64 kTileModeCount = kMirror_TileMode + 1
73 const SkMatrix& getLocalMatrix()
const;
81 virtual bool isOpaque()
const {
return false; }
83 #ifdef SK_SUPPORT_LEGACY_SHADER_ISABITMAP
89 bool isABitmap(
SkBitmap* outTexture,
SkMatrix* outMatrix, TileMode xy[2])
const;
91 bool isABitmap()
const {
92 return this->isABitmap(
nullptr,
nullptr,
nullptr);
102 bool isAImage()
const {
103 return this->isAImage(
nullptr,
nullptr) !=
nullptr;
138 kLinear_GradientType,
139 kRadial_GradientType,
141 kConical_GradientType,
142 kLast_GradientType = kConical_GradientType
160 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
164 SkBlendMode fBlendMode;
166 virtual bool asACompose(ComposeRec*)
const {
return false; }
217 SkBlendMode mode,
float lerp = 1);
224 return MakeCompose(std::move(dst), std::move(src), mode, 1);
236 return MakeCompose(std::move(dst), std::move(src), SkBlendMode::kSrc, lerp);
254 const SkMatrix* localMatrix =
nullptr);
284 friend class SkShaderBase;
TileMode fTileMode
The tile mode used.
Definition: SkShader.h:154
Definition: SkColorSpace.h:59
The SkPath class encapsulates compound (multiple contour) geometric paths consisting of straight line...
Definition: SkPath.h:25
Shaders specify the source color(s) for what is being drawn.
Definition: SkShader.h:41
ColorFilters are optional objects in the drawing pipeline.
Definition: SkColorFilter.h:32
static sk_sp< SkShader > MakeMixer(sk_sp< SkShader > dst, sk_sp< SkShader > src, float lerp)
Compose two shaders together using a weighted average.
Definition: SkShader.h:235
Definition: SkPoint.h:156
SkColor * fColors
The colors in the gradient.
Definition: SkShader.h:150
The SkMatrix class holds a 3x3 matrix for transforming coordinates.
Definition: SkMatrix.h:28
virtual bool isOpaque() const
Returns true if the shader is guaranteed to produce only opaque colors, subject to the SkPaint using ...
Definition: SkShader.h:81
uint32_t fGradientFlags
see SkGradientShader::Flags
Definition: SkShader.h:155
Definition: SkColor.h:179
An SkPicture records drawing commands made to a canvas to be played back at a later time...
Definition: SkPicture.h:38
SkFlattenable is the base class for objects that need to be flattened into a data stream for either t...
Definition: SkFlattenable.h:70
The SkBitmap class specifies a raster bitmap.
Definition: SkBitmap.h:37
Definition: GrContext.h:47
SkScalar * fColorOffsets
The unit offset for color transitions.
Definition: SkShader.h:151
uint32_t SkColor
32 bit ARGB color value, not premultiplied.
Definition: SkColor.h:28
int fColorCount
In-out parameter, specifies passed size.
Definition: SkShader.h:146
GradientType
If the shader subclass can be represented as a gradient, asAGradient returns the matching GradientTyp...
Definition: SkShader.h:135
TileMode
Definition: SkShader.h:43
replicate the edge color if the shader draws outside of its original bounds
Definition: SkShader.h:47
Definition: SkShader.h:145
repeat the shader's image horizontally and vertically
Definition: SkShader.h:50
SkImage is an abstraction for drawing a rectagle of pixels, though the particular type of image could...
Definition: SkImage.h:48
repeat the shader's image horizontally and vertically, alternating mirror images so that adjacent ima...
Definition: SkShader.h:55