Skia
2D Graphics Library
SkDrawLooper::Context Class Referenceabstract

Holds state during a draw. More...

#include <SkDrawLooper.h>

Classes

struct  Info
 

Public Member Functions

 Context ()
 
virtual ~Context ()
 
virtual bool next (Info *, SkPaint *)=0
 Called in a loop on objects returned by SkDrawLooper::createContext(). More...
 

Detailed Description

Holds state during a draw.

Users call next() until it returns false.

Subclasses of SkDrawLooper should create a subclass of this object to hold state specific to their subclass.

Constructor & Destructor Documentation

◆ Context()

SkDrawLooper::Context::Context ( )
inline

◆ ~Context()

virtual SkDrawLooper::Context::~Context ( )
inlinevirtual

Member Function Documentation

◆ next()

virtual bool SkDrawLooper::Context::next ( Info ,
SkPaint  
)
pure virtual

Called in a loop on objects returned by SkDrawLooper::createContext().

Each time true is returned, the object is drawn (possibly with a modified canvas and/or paint). When false is finally returned, drawing for the object stops.

On each call, the paint will be in its original state, but the canvas will be as it was following the previous call to next() or createContext().

The implementation must ensure that, when next() finally returns false, the canvas has been restored to the state it was initially, before createContext() was first called.


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