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

Public Member Functions

 CircDrawable (SkScalar size, SkColor c)
 
- Public Member Functions inherited from ModeDrawable
 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
 

Protected Member Functions

SkRect onGetBounds () override
 
void onDraw (SkCanvas *canvas) override
 
- 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 ()
 

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)
 
- Public Attributes inherited from ModeDrawable
SkBlendMode fMode
 
SkPoint fLoc
 

Detailed Description

Definition at line 82 of file XferSlide.cpp.

Constructor & Destructor Documentation

◆ CircDrawable()

CircDrawable::CircDrawable ( SkScalar  size,
SkColor  c 
)
inline

Definition at line 87 of file XferSlide.cpp.

87 {
88 const SkColor colors[] = { 0, c };
90 colors, nullptr, 2,
92 fBounds = SkRect::MakeWH(size, size);
93 }
uint32_t SkColor
Definition: SkColor.h:37
static sk_sp< SkShader > MakeRadial(const SkPoint &center, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
void setShader(sk_sp< SkShader > shader)
PODArray< SkColor > colors
Definition: SkRecords.h:276
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
static constexpr SkPoint Make(float x, float y)
Definition: SkPoint_impl.h:173
static constexpr SkRect MakeWH(float w, float h)
Definition: SkRect.h:609

Member Function Documentation

◆ onDraw()

void CircDrawable::onDraw ( SkCanvas canvas)
inlineoverrideprotectedvirtual

Implements SkDrawable.

Definition at line 100 of file XferSlide.cpp.

100 {
101 fPaint.setBlendMode(fMode);
102 canvas->save();
103 canvas->translate(fLoc.x(), fLoc.y());
104 canvas->drawOval(fBounds, fPaint);
105 canvas->restore();
106 }
SkBlendMode fMode
Definition: XferSlide.cpp:73
SkPoint fLoc
Definition: XferSlide.cpp:74
void drawOval(const SkRect &oval, const SkPaint &paint)
Definition: SkCanvas.cpp:1698
void restore()
Definition: SkCanvas.cpp:461
void translate(SkScalar dx, SkScalar dy)
Definition: SkCanvas.cpp:1278
int save()
Definition: SkCanvas.cpp:447
void setBlendMode(SkBlendMode mode)
Definition: SkPaint.cpp:151
constexpr float y() const
Definition: SkPoint_impl.h:187
constexpr float x() const
Definition: SkPoint_impl.h:181

◆ onGetBounds()

SkRect CircDrawable::onGetBounds ( )
inlineoverrideprotectedvirtual

Implements SkDrawable.

Definition at line 96 of file XferSlide.cpp.

96 {
97 return fBounds;
98 }

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