Flutter Engine
The Flutter Engine
|
#include <SkClipStack.h>
Public Types | |
enum class | DeviceSpaceType { kEmpty , kRect , kRRect , kPath , kShader , kLastType = kShader } |
Public Member Functions | |
Element () | |
Element (const Element &) | |
Element (const SkRect &rect, const SkMatrix &m, SkClipOp op, bool doAA) | |
Element (const SkRRect &rrect, const SkMatrix &m, SkClipOp op, bool doAA) | |
Element (const SkPath &path, const SkMatrix &m, SkClipOp op, bool doAA) | |
Element (sk_sp< SkShader > shader) | |
Element (const SkRect &rect, bool doAA) | |
~Element () | |
bool | operator== (const Element &element) const |
bool | operator!= (const Element &element) const |
Call to get the type of the clip element. More... | |
DeviceSpaceType | getDeviceSpaceType () const |
Call to get the save count associated with this clip element. More... | |
int | getSaveCount () const |
Call if getDeviceSpaceType() is kPath to get the path. More... | |
const SkPath & | getDeviceSpacePath () const |
Call if getDeviceSpaceType() is kRRect to get the round-rect. More... | |
const SkRRect & | getDeviceSpaceRRect () const |
Call if getDeviceSpaceType() is kRect to get the rect. More... | |
const SkRect & | getDeviceSpaceRect () const |
Call if getDeviceSpaceType() is kShader to get a reference to the clip shader. More... | |
sk_sp< SkShader > | refShader () const |
const SkShader * | getShader () const |
SkClipOp | getOp () const |
bool | isReplaceOp () const |
Call to get the element as a path, regardless of its type. More... | |
void | asDeviceSpacePath (SkPath *path) const |
Call if getType() is not kPath to get the element as a round rect. More... | |
const SkRRect & | asDeviceSpaceRRect () const |
bool | isAA () const |
Inverts the fill of the clip shape. Note that a kEmpty element remains kEmpty. More... | |
void | invertShapeFillType () |
uint32_t | getGenID () const |
const SkRect & | getBounds () const |
bool | contains (const SkRect &rect) const |
bool | contains (const SkRRect &rrect) const |
bool | isInverseFilled () const |
Static Public Attributes | |
static const int | kTypeCnt = (int)DeviceSpaceType::kLastType + 1 |
Friends | |
class | SkClipStack |
An element of the clip stack. It represents a shape combined with the prevoius clip using a set operator. Each element can be antialiased or not.
Definition at line 50 of file SkClipStack.h.
|
strong |
This indicates the shape type of the clip element in device space.
Definition at line 53 of file SkClipStack.h.
|
inline |
Definition at line 69 of file SkClipStack.h.
SkClipStack::Element::Element | ( | const Element & | that | ) |
Definition at line 22 of file SkClipStack.cpp.
|
inline |
Definition at line 76 of file SkClipStack.h.
|
inline |
Definition at line 80 of file SkClipStack.h.
|
inline |
Definition at line 84 of file SkClipStack.h.
Definition at line 88 of file SkClipStack.h.
|
inline |
Definition at line 92 of file SkClipStack.h.
|
default |
void SkClipStack::Element::asDeviceSpacePath | ( | SkPath * | path | ) | const |
Call if getType() is not kPath to get the element as a round rect.
Definition at line 255 of file SkClipStack.cpp.
|
inline |
Definition at line 144 of file SkClipStack.h.
bool SkClipStack::Element::contains | ( | const SkRect & | rect | ) | const |
Conservatively checks whether the clip shape contains the rect/rrect. (Whether the shape is inverse filled is not considered.)
Definition at line 106 of file SkClipStack.cpp.
bool SkClipStack::Element::contains | ( | const SkRRect & | rrect | ) | const |
Definition at line 123 of file SkClipStack.cpp.
const SkRect & SkClipStack::Element::getBounds | ( | ) | const |
Gets the bounds of the clip element, either the rect or path bounds. (Whether the shape is inverse filled is not considered.)
Definition at line 84 of file SkClipStack.cpp.
|
inline |
Call if getDeviceSpaceType() is kRRect to get the round-rect.
Definition at line 108 of file SkClipStack.h.
|
inline |
Call if getDeviceSpaceType() is kShader to get a reference to the clip shader.
Definition at line 120 of file SkClipStack.h.
|
inline |
Call if getDeviceSpaceType() is kRect to get the rect.
Definition at line 114 of file SkClipStack.h.
|
inline |
Call to get the save count associated with this clip element.
Definition at line 102 of file SkClipStack.h.
|
inline |
The GenID can be used by clip stack clients to cache representations of the clip. The ID corresponds to the set of clip elements up to and including this element within the stack not to the element itself. That is the same clip path in different stacks will have a different ID since the elements produce different clip result in the context of their stacks.
Definition at line 161 of file SkClipStack.h.
|
inline |
Definition at line 136 of file SkClipStack.h.
|
inline |
Call if getDeviceSpaceType() is kPath to get the path.
Definition at line 105 of file SkClipStack.h.
|
inline |
Call if getDeviceSpaceType() is not kEmpty to get the set operation used to combine this element.
Definition at line 130 of file SkClipStack.h.
void SkClipStack::Element::invertShapeFillType | ( | ) |
Definition at line 141 of file SkClipStack.cpp.
|
inline |
Inverts the fill of the clip shape. Note that a kEmpty element remains kEmpty.
If getType() is not kEmpty this indicates whether the clip shape should be anti-aliased when it is rasterized.
Definition at line 151 of file SkClipStack.h.
|
inline |
Is the clip shape inverse filled.
Definition at line 179 of file SkClipStack.h.
|
inline |
Call to get the element as a path, regardless of its type.
Definition at line 138 of file SkClipStack.h.
|
inline |
Call to get the type of the clip element.
Definition at line 99 of file SkClipStack.h.
bool SkClipStack::Element::operator== | ( | const Element & | element | ) | const |
Definition at line 58 of file SkClipStack.cpp.
Definition at line 127 of file SkClipStack.h.
|
friend |
Definition at line 193 of file SkClipStack.h.
|
static |
Definition at line 67 of file SkClipStack.h.