Flutter Engine
The Flutter Engine
Classes | Public Member Functions | Static Public Member Functions | List of all members
SkPathEffectBase Class Referenceabstract

#include <SkPathEffectBase.h>

Inheritance diagram for SkPathEffectBase:
SkPathEffect SkFlattenable SkRefCnt SkRefCntBase Sk1DPathEffect Sk2DPathEffect SkCornerPathEffectImpl SkDashImpl SkDiscretePathEffectImpl SkPairPathEffect SkTrimPE SkPath1DPathEffectImpl SkLine2DPathEffectImpl SkPath2DPathEffectImpl SkComposePathEffect SkSumPathEffect

Classes

class  PointData
 

Public Member Functions

 SkPathEffectBase ()
 
bool asPoints (PointData *results, const SkPath &src, const SkStrokeRec &, const SkMatrix &, const SkRect *cullR) const
 
SkFlattenable::Type getFlattenableType () const override
 
virtual bool onFilterPath (SkPath *, const SkPath &, SkStrokeRec *, const SkRect *, const SkMatrix &) const =0
 
virtual bool onNeedsCTM () const
 
virtual bool onAsPoints (PointData *, const SkPath &, const SkStrokeRec &, const SkMatrix &, const SkRect *) const
 
virtual DashType onAsADash (DashInfo *) const
 
virtual bool computeFastBounds (SkRect *bounds) const =0
 
- Public Member Functions inherited from SkPathEffect
DashType asADash (DashInfo *info) const
 
bool filterPath (SkPath *dst, const SkPath &src, SkStrokeRec *, const SkRect *cullR) const
 
bool filterPath (SkPath *dst, const SkPath &src, SkStrokeRec *, const SkRect *cullR, const SkMatrix &ctm) const
 
bool needsCTM () const
 
- 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
 

Static Public Member Functions

static sk_sp< SkPathEffectDeserialize (const void *data, size_t size, const SkDeserialProcs *procs=nullptr)
 
static void RegisterFlattenables ()
 
- Static Public Member Functions inherited from SkPathEffect
static sk_sp< SkPathEffectMakeSum (sk_sp< SkPathEffect > first, sk_sp< SkPathEffect > second)
 
static sk_sp< SkPathEffectMakeCompose (sk_sp< SkPathEffect > outer, sk_sp< SkPathEffect > inner)
 
static SkFlattenable::Type GetFlattenableType ()
 
static sk_sp< SkPathEffectDeserialize (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)
 

Additional Inherited Members

- Public Types inherited from SkPathEffect
enum  DashType { kNone_DashType , kDash_DashType }
 
- 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 &)
 

Detailed Description

Definition at line 19 of file SkPathEffectBase.h.

Constructor & Destructor Documentation

◆ SkPathEffectBase()

SkPathEffectBase::SkPathEffectBase ( )
inline

Definition at line 21 of file SkPathEffectBase.h.

21{}

Member Function Documentation

◆ asPoints()

bool SkPathEffectBase::asPoints ( PointData results,
const SkPath src,
const SkStrokeRec rec,
const SkMatrix mx,
const SkRect cullR 
) const

Does applying this path effect to 'src' yield a set of points? If so, optionally return the points in 'results'.

Definition at line 47 of file SkPathEffect.cpp.

48 {
49 return this->onAsPoints(results, src, rec, mx, rect);
50}
virtual bool onAsPoints(PointData *, const SkPath &, const SkStrokeRec &, const SkMatrix &, const SkRect *) const
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350

◆ computeFastBounds()

virtual bool SkPathEffectBase::computeFastBounds ( SkRect bounds) const
pure virtual

◆ Deserialize()

static sk_sp< SkPathEffect > SkPathEffectBase::Deserialize ( const void *  data,
size_t  size,
const SkDeserialProcs procs = nullptr 
)
inlinestatic

Definition at line 86 of file SkPathEffectBase.h.

87 {
88 return sk_sp<SkPathEffect>(static_cast<SkPathEffect*>(
90 kSkPathEffect_Type, data, size, procs).release()));
91 }
static sk_sp< SkFlattenable > Deserialize(Type, const void *data, size_t length, const SkDeserialProcs *procs=nullptr)
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
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63

◆ getFlattenableType()

SkFlattenable::Type SkPathEffectBase::getFlattenableType ( ) const
inlineoverridevirtual

If the PathEffect can be represented as a dash pattern, asADash will return kDash_DashType and None otherwise. If a non NULL info is passed in, the various DashInfo will be filled in if the PathEffect can be a dash pattern. If passed in info has an fCount equal or greater to that of the effect, it will memcpy the values of the dash intervals into the info. Thus the general approach will be call asADash once with default info to get DashType and fCount. If effect can be represented as a dash pattern, allocate space for the intervals in info, then call asADash again with the same info and the intervals will get copied in.

Implements SkFlattenable.

Definition at line 82 of file SkPathEffectBase.h.

82 {
83 return kSkPathEffect_Type;
84 }

◆ onAsADash()

virtual DashType SkPathEffectBase::onAsADash ( DashInfo ) const
inlinevirtual

Reimplemented in SkDashImpl.

Definition at line 110 of file SkPathEffectBase.h.

110 {
111 return kNone_DashType;
112 }
@ kNone_DashType
ignores the info parameter
Definition: SkPathEffect.h:61

◆ onAsPoints()

virtual bool SkPathEffectBase::onAsPoints ( PointData ,
const SkPath ,
const SkStrokeRec ,
const SkMatrix ,
const SkRect  
) const
inlinevirtual

Reimplemented in SkDashImpl.

Definition at line 106 of file SkPathEffectBase.h.

107 {
108 return false;
109 }

◆ onFilterPath()

virtual bool SkPathEffectBase::onFilterPath ( SkPath ,
const SkPath ,
SkStrokeRec ,
const SkRect ,
const SkMatrix  
) const
pure virtual

Filter the input path.

The CTM parameter is provided for path effects that can use the information. The output of path effects must always be in the original (input) coordinate system, regardless of whether the path effect uses the CTM or not.

Implemented in Sk1DPathEffect, SkCornerPathEffectImpl, SkDashImpl, SkTrimPE, SkDiscretePathEffectImpl, Sk2DPathEffect, SkComposePathEffect, SkSumPathEffect, SkPath1DPathEffectImpl, and SkLine2DPathEffectImpl.

◆ onNeedsCTM()

virtual bool SkPathEffectBase::onNeedsCTM ( ) const
inlinevirtual

Path effects requiring a valid CTM should override to return true.

Definition at line 104 of file SkPathEffectBase.h.

104{ return false; }

◆ RegisterFlattenables()

void SkPathEffectBase::RegisterFlattenables ( )
static

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