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. | |
DeviceSpaceType | getDeviceSpaceType () const |
Call to get the save count associated with this clip element. | |
int | getSaveCount () const |
Call if getDeviceSpaceType() is kPath to get the path. | |
const SkPath & | getDeviceSpacePath () const |
Call if getDeviceSpaceType() is kRRect to get the round-rect. | |
const SkRRect & | getDeviceSpaceRRect () const |
Call if getDeviceSpaceType() is kRect to get the rect. | |
const SkRect & | getDeviceSpaceRect () const |
Call if getDeviceSpaceType() is kShader to get a reference to the clip shader. | |
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. | |
void | asDeviceSpacePath (SkPath *path) const |
Call if getType() is not kPath to get the element as a round rect. | |
const SkRRect & | asDeviceSpaceRRect () const |
bool | isAA () const |
Inverts the fill of the clip shape. Note that a kEmpty element remains kEmpty. | |
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 49 of file SkClipStack.h.
|
strong |
This indicates the shape type of the clip element in device space.
Definition at line 52 of file SkClipStack.h.
|
inline |
Definition at line 68 of file SkClipStack.h.
SkClipStack::Element::Element | ( | const Element & | that | ) |
Definition at line 22 of file SkClipStack.cpp.
|
inline |
Definition at line 75 of file SkClipStack.h.
|
inline |
Definition at line 79 of file SkClipStack.h.
|
inline |
Definition at line 83 of file SkClipStack.h.
Definition at line 87 of file SkClipStack.h.
|
inline |
Definition at line 91 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 143 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 107 of file SkClipStack.h.
|
inline |
Call if getDeviceSpaceType() is kShader to get a reference to the clip shader.
Definition at line 119 of file SkClipStack.h.
|
inline |
Call if getDeviceSpaceType() is kRect to get the rect.
Definition at line 113 of file SkClipStack.h.
|
inline |
Call to get the save count associated with this clip element.
Definition at line 101 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 160 of file SkClipStack.h.
|
inline |
Definition at line 135 of file SkClipStack.h.
|
inline |
Call if getDeviceSpaceType() is kPath to get the path.
Definition at line 104 of file SkClipStack.h.
|
inline |
Call if getDeviceSpaceType() is not kEmpty to get the set operation used to combine this element.
Definition at line 129 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 150 of file SkClipStack.h.
|
inline |
Is the clip shape inverse filled.
Definition at line 178 of file SkClipStack.h.
|
inline |
Call to get the element as a path, regardless of its type.
Definition at line 137 of file SkClipStack.h.
|
inline |
Call to get the type of the clip element.
Definition at line 98 of file SkClipStack.h.
bool SkClipStack::Element::operator== | ( | const Element & | element | ) | const |
Definition at line 58 of file SkClipStack.cpp.
Definition at line 126 of file SkClipStack.h.
|
friend |
Definition at line 192 of file SkClipStack.h.
|
static |
Definition at line 66 of file SkClipStack.h.