Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
ModeDrawable Class Reference
Inheritance diagram for ModeDrawable:
SkDrawable SkFlattenable SkRefCnt SkRefCntBase CircDrawable

Public Member Functions

 ModeDrawable ()
 
bool hitTest (SkScalar x, SkScalar y)
 
- Public Member Functions inherited from SkDrawable
void draw (SkCanvas *, const SkMatrix *=nullptr)
 
void draw (SkCanvas *, SkScalar x, SkScalar y)
 
std::unique_ptr< GpuDrawHandlersnapGpuDrawHandler (GrBackendApi backendApi, const SkMatrix &matrix, const SkIRect &clipBounds, const SkImageInfo &bufferInfo)
 
sk_sp< SkPicturemakePictureSnapshot ()
 
uint32_t getGenerationID ()
 
SkRect getBounds ()
 
size_t approximateBytesUsed ()
 
void notifyDrawingChanged ()
 
SkFlattenable::Type getFlattenableType () const override
 
Factory getFactory () const override
 
const char * getTypeName () const override
 
- Public Member Functions inherited from SkFlattenable
 SkFlattenable ()
 
virtual Factory getFactory () const =0
 
virtual const char * getTypeName () const =0
 
virtual void flatten (SkWriteBuffer &) const
 
virtual Type getFlattenableType () const =0
 
sk_sp< SkDataserialize (const SkSerialProcs *=nullptr) const
 
size_t serialize (void *memory, size_t memory_size, const SkSerialProcs *=nullptr) const
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Public Attributes

SkBlendMode fMode
 
SkPoint fLoc
 

Additional Inherited Members

- Public Types inherited from SkFlattenable
enum  Type {
  kSkColorFilter_Type , kSkBlender_Type , kSkDrawable_Type , kSkDrawLooper_Type ,
  kSkImageFilter_Type , kSkMaskFilter_Type , kSkPathEffect_Type , kSkShader_Type
}
 
typedef sk_sp< SkFlattenable >(* Factory) (SkReadBuffer &)
 
- Static Public Member Functions inherited from SkDrawable
static SkFlattenable::Type GetFlattenableType ()
 
static sk_sp< SkDrawableDeserialize (const void *data, size_t size, const SkDeserialProcs *procs=nullptr)
 
- Static Public Member Functions inherited from SkFlattenable
static Factory NameToFactory (const char name[])
 
static const char * FactoryToName (Factory)
 
static void Register (const char name[], Factory)
 
static sk_sp< SkFlattenableDeserialize (Type, const void *data, size_t length, const SkDeserialProcs *procs=nullptr)
 
- Protected Member Functions inherited from SkDrawable
 SkDrawable ()
 
virtual SkRect onGetBounds ()=0
 
virtual size_t onApproximateBytesUsed ()
 
virtual void onDraw (SkCanvas *)=0
 
virtual std::unique_ptr< GpuDrawHandleronSnapGpuDrawHandler (GrBackendApi, const SkMatrix &, const SkIRect &, const SkImageInfo &)
 
virtual std::unique_ptr< GpuDrawHandleronSnapGpuDrawHandler (GrBackendApi, const SkMatrix &)
 
virtual sk_sp< SkPictureonMakePictureSnapshot ()
 

Detailed Description

Definition at line 69 of file XferSlide.cpp.

Constructor & Destructor Documentation

◆ ModeDrawable()

ModeDrawable::ModeDrawable ( )
inline

Definition at line 71 of file XferSlide.cpp.

@ kSrcOver
r = s + (1-sa)*d
SkBlendMode fMode
Definition: XferSlide.cpp:73
SkPoint fLoc
Definition: XferSlide.cpp:74
static constexpr SkPoint Make(float x, float y)
Definition: SkPoint_impl.h:173

Member Function Documentation

◆ hitTest()

bool ModeDrawable::hitTest ( SkScalar  x,
SkScalar  y 
)
inline

Definition at line 76 of file XferSlide.cpp.

76 {
77 SkRect target = SkRect::MakeXYWH(x - fLoc.x() - 1, y - fLoc.y() - 1, 3, 3);
78 return this->getBounds().intersects(target);
79 }
SkRect getBounds()
Definition: SkDrawable.cpp:71
uint32_t * target
double y
double x
constexpr float y() const
Definition: SkPoint_impl.h:187
constexpr float x() const
Definition: SkPoint_impl.h:181
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
Definition: SkRect.h:659
bool intersects(const SkRect &r) const
Definition: SkRect.h:1121

Member Data Documentation

◆ fLoc

SkPoint ModeDrawable::fLoc

Definition at line 74 of file XferSlide.cpp.

◆ fMode

SkBlendMode ModeDrawable::fMode

Definition at line 73 of file XferSlide.cpp.


The documentation for this class was generated from the following file: