Skia
2DGraphicsLibrary
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
SkDrawLooper.h
1
2
/*
3
* Copyright 2011 The Android Open Source Project
4
*
5
* Use of this source code is governed by a BSD-style license that can be
6
* found in the LICENSE file.
7
*/
8
9
10
#ifndef SkDrawLooper_DEFINED
11
#define SkDrawLooper_DEFINED
12
13
#include "SkBlurTypes.h"
14
#include "SkFlattenable.h"
15
#include "SkPoint.h"
16
#include "
SkColor.h
"
17
18
class
SkCanvas
;
19
class
SkPaint
;
20
struct
SkRect
;
21
class
SkString
;
22
31
class
SK_API
SkDrawLooper
:
public
SkFlattenable
{
32
public
:
39
class
SK_API
Context
: ::SkNoncopyable {
40
public
:
41
Context
() {}
42
virtual
~
Context
() {}
43
58
virtual
bool
next(
SkCanvas
* canvas,
SkPaint
* paint) = 0;
59
};
60
69
virtual
Context
* createContext(
SkCanvas
*,
void
* storage)
const
= 0;
70
75
virtual
size_t
contextSize()
const
= 0;
76
77
88
bool
canComputeFastBounds(
const
SkPaint
& paint)
const
;
89
void
computeFastBounds(
const
SkPaint
& paint,
const
SkRect
& src,
SkRect
* dst)
const
;
90
91
struct
BlurShadowRec
{
92
SkScalar fSigma;
93
SkVector
fOffset;
94
SkColor
fColor;
95
SkBlurStyle fStyle;
96
SkBlurQuality fQuality;
97
};
107
virtual
bool
asABlurShadow(
BlurShadowRec
*)
const
;
108
109
SK_TO_STRING_PUREVIRT()
110
SK_DEFINE_FLATTENABLE_TYPE(
SkDrawLooper
)
111
112
protected:
113
SkDrawLooper
() {}
114
115
private
:
116
typedef
SkFlattenable
INHERITED;
117
};
118
119
#endif
SkCanvas
A Canvas encapsulates all of the state about drawing into a device (bitmap).
Definition:
SkCanvas.h:58
SkPoint
Definition:
SkPoint.h:156
SkPaint
The SkPaint class holds the style and color information about how to draw geometries, text and bitmaps.
Definition:
SkPaint.h:46
SkFlattenable
SkFlattenable is the base class for objects that need to be flattened into a data stream for either t...
Definition:
SkFlattenable.h:70
SkDrawLooper::Context
Holds state during a draw.
Definition:
SkDrawLooper.h:39
SkColor
uint32_t SkColor
32 bit ARGB color value, not premultiplied.
Definition:
SkColor.h:28
SkDrawLooper
Subclasses of SkDrawLooper can be attached to a SkPaint.
Definition:
SkDrawLooper.h:31
SkRect
Definition:
SkRect.h:390
SkDrawLooper::BlurShadowRec
Definition:
SkDrawLooper.h:91
SkString
Light weight class for managing strings.
Definition:
SkString.h:121
SkColor.h
Types and macros for colors.