Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
SkLinearGradient.h
Go to the documentation of this file.
1/*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef SkLinearGradient_DEFINED
9#define SkLinearGradient_DEFINED
10
14
15class SkArenaAlloc;
16class SkMatrix;
18class SkReadBuffer;
19class SkWriteBuffer;
20
22public:
23 SkLinearGradient(const SkPoint pts[2], const Descriptor&);
24
25 GradientType asGradient(GradientInfo* info, SkMatrix* localMatrix) const override;
26
27 const SkPoint& start() const { return fStart; }
28 const SkPoint& end() const { return fEnd; }
29protected:
31 void flatten(SkWriteBuffer& buffer) const override;
32
34 SkRasterPipeline* postPipeline) const final;
35
36private:
37 friend void ::SkRegisterLinearGradientShaderFlattenable();
39
40 class LinearGradient4fContext;
41
42 friend class SkGradientShader;
44 const SkPoint fStart;
45 const SkPoint fEnd;
46};
47
48#endif
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213
#define SK_FLATTENABLE_HOOKS(type)
const SkPoint & start() const
SkLinearGradient(SkReadBuffer &buffer)
void flatten(SkWriteBuffer &buffer) const override
void appendGradientStages(SkArenaAlloc *alloc, SkRasterPipeline *tPipeline, SkRasterPipeline *postPipeline) const final
GradientType asGradient(GradientInfo *info, SkMatrix *localMatrix) const override
const SkPoint & end() const
static const uint8_t buffer[]