Skia
2DGraphicsLibrary
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkLayerRasterizer::Builder Class Reference

Public Member Functions

void addLayer (const SkPaint &paint)
 
void addLayer (const SkPaint &paint, SkScalar dx, SkScalar dy)
 Add a new layer (above any previous layers) to the rasterizer. More...
 
sk_sp< SkLayerRasterizerdetach ()
 Pass queue of layers on to newly created layer rasterizer and return it. More...
 
sk_sp< SkLayerRasterizersnapshot () const
 Create and return a new immutable SkLayerRasterizer that contains a shapshot of the layers that were added to the Builder, without modifying the Builder. More...
 

Private Attributes

SkDequefLayers
 

Member Function Documentation

void SkLayerRasterizer::Builder::addLayer ( const SkPaint paint,
SkScalar  dx,
SkScalar  dy 
)

Add a new layer (above any previous layers) to the rasterizer.

The layer will extract those fields that affect the mask from the specified paint, but will not retain a reference to the paint object itself, so it may be reused without danger of side-effects.

sk_sp<SkLayerRasterizer> SkLayerRasterizer::Builder::detach ( )

Pass queue of layers on to newly created layer rasterizer and return it.

The builder cannot be used any more after calling this function. If no layers have been added, returns NULL.

The caller is responsible for calling unref() on the returned object, if non NULL.

sk_sp<SkLayerRasterizer> SkLayerRasterizer::Builder::snapshot ( ) const

Create and return a new immutable SkLayerRasterizer that contains a shapshot of the layers that were added to the Builder, without modifying the Builder.

The Builder may be used after calling this function. It will continue to hold any layers previously added, so consecutive calls to this function will return identical objects, and objects returned by future calls to this function contain all the layers in previously returned objects. If no layers have been added, returns NULL.

Future calls to addLayer will not affect rasterizers previously returned by this call.

The caller is responsible for calling unref() on the returned object, if non NULL.


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