Skia
2D Graphics Library
SkPicture::AbortCallback Class Referenceabstract

#include <SkPicture.h>

Public Member Functions

 AbortCallback ()
 Has no effect. More...
 
virtual ~AbortCallback ()
 Has no effect. More...
 
virtual bool abort ()=0
 Stops SkPicture playback when some condition is met. More...
 

Detailed Description

AbortCallback is an abstract class. An implementation of AbortCallback may passed as a parameter to SkPicture::playback, to stop it before all drawing commands have been processed.

If AbortCallback::abort returns true, SkPicture::playback is interrupted.

Constructor & Destructor Documentation

◆ AbortCallback()

SkPicture::AbortCallback::AbortCallback ( )
inline

Has no effect.

Returns
abstract class cannot be instantiated

◆ ~AbortCallback()

virtual SkPicture::AbortCallback::~AbortCallback ( )
inlinevirtual

Has no effect.

Member Function Documentation

◆ abort()

virtual bool SkPicture::AbortCallback::abort ( )
pure virtual

Stops SkPicture playback when some condition is met.

A subclass of AbortCallback provides an override for abort() that can stop SkPicture::playback.

The part of SkPicture drawn when aborted is undefined. SkPicture instantiations are free to stop drawing at different points during playback.

If the abort happens inside one or more calls to SkCanvas::save(), stack of SkCanvas matrix and SkCanvas clip values is restored to its state before SkPicture::playback was called.

Returns
true to stop playback

example: https://fiddle.skia.org/c/@Picture_AbortCallback_abort


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