SkPicture Reference

Picture

Class SkPicture

Constructor

SkPicture can be constructed or initialized by these functions, including C++ class constructors.

An SkPicture records drawing commands made to a canvas to be played back at a later time. This base class handles serialization and a few other miscellany.

Overview

Class

SkPicture uses C++ classes to declare the public data structures and interfaces.

Member Function

SkPicture member functions read and modify the structure properties.

Class SkPicture::AbortCallback

Constructor

SkPicture can be constructed or initialized by these functions, including C++ class constructors.

Member_Function

SkPicture member functions read and modify the structure properties.

Subclasses of this can be passed to playback. During the playback of the picture, this callback will periodically be invoked. If its abort returns true, then picture playback will be interrupted. The resulting drawing is undefined, as there is no guarantee how often the callback will be invoked. If the abort happens inside some level of nested calls to save(), restore will automatically be called to return the state to the same level it was before the playback call was made.

AbortCallback

Return Value

incomplete

Example

See Also

incomplete


~AbortCallback

Example

See Also

incomplete


abort

Return Value

incomplete

Example

See Also

incomplete


MakeFromStream

Recreate a picture that was serialized into a stream or data.

Parameters

Return Value

incomplete

Example

See Also

incomplete


MakeFromData

Parameters

Return Value

incomplete

Example

See Also

incomplete


Parameters

Return Value

incomplete

Example

See Also

incomplete


playback

Replays the drawing commands on the specified canvas. Note that this has the effect of unfurling this picture into the destination canvas. Using the SkCanvas::drawPicture entry point gives the destination canvas the option of just taking a ref.

Parameters

Return Value

incomplete

Example

See Also

incomplete


cullRect

Return a cull rect for this picture. Ops recorded into this picture that attempt to draw outside the cull might not be drawn.

Return Value

incomplete

Example

See Also

incomplete


uniqueID

Returns a non-zero value unique among all pictures.

Return Value

incomplete

Example

See Also

incomplete


serialize

Parameters

Return Value

incomplete

Example

See Also

incomplete


Parameters

Example

See Also

incomplete


MakePlaceholder

Return a placeholder SkPicture. This placeholder does not draw anything itself. It has a distinct uniqueID (just like all Pictures) and will always be visible to SkSerialProcs.

Parameters

Return Value

incomplete

Example

See Also

incomplete


approximateOpCount

Return the approximate number of operations in this picture. This number may be greater or less than the number of SkCanvas calls recorded: some calls may be recorded as more than one operation, or some calls may be optimized away.

Return Value

incomplete

Example

See Also

incomplete


approximateBytesUsed

Returns the approximate byte size of this picture, not including large ref'd objects.

Return Value

incomplete

Example

See Also

incomplete