Skia
2D Graphics Library
SkPicture::AbortCallback Class Referenceabstract

AbortCallback is an abstract class. More...

#include <SkPicture.h>

Public Member Functions

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

Protected Member Functions

 AbortCallback ()=default
 
 AbortCallback (const AbortCallback &)=delete
 
AbortCallbackoperator= (const AbortCallback &)=delete
 

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()

virtual SkPicture::AbortCallback::~AbortCallback ( )
virtualdefault

Has no effect.

◆ AbortCallback() [1/2]

SkPicture::AbortCallback::AbortCallback ( )
protecteddefault

◆ AbortCallback() [2/2]

SkPicture::AbortCallback::AbortCallback ( const AbortCallback )
protecteddelete

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

◆ operator=()

AbortCallback& SkPicture::AbortCallback::operator= ( const AbortCallback )
protecteddelete

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