Lines Matching refs:layer

56  * for each layer. Doing a save() will duplicate this list so that each graphics2D object
72 // local layer data
73 /** a local layer created with {@link Canvas#saveLayer(RectF, Paint, int)}.
74 * If this is null, this does not mean there's no layer, just that the snapshot is not the
75 * one that created the layer.
87 * Class containing information about a layer.
89 * This contains graphics, bitmap and layer information.
95 /** the flags that were used to configure the layer. This is never changed, and passed
98 /** the original content of the layer when the next object was created. This is not
99 * passed in {@link #makeCopy()} and instead is recreated when a new layer is added
104 * Creates a layer with a graphics and a bitmap. This is only used to create
105 * the base layer.
118 * Creates a layer with a graphics and an image. If the image belongs to a
119 * {@link Bitmap_Delegate} (case of the base layer), then
122 * @param graphics the graphics the new graphics for this layer
124 * @param flags the flags that were used to save this layer
143 /** Returns the layer save flags. This is only valid for additional layers.
144 * For the base layer this will always return 0;
145 * For a given layer, all further copies of this {@link Layer} object in new snapshots
170 * Sets the clip for the graphics2D object associated with the layer.
184 * Clips the layer with the given shape. This performs an intersect between the current
227 * Saves the current state and creates a new layer, and returns the new current snapshot.
231 * @param layerBounds the layer bounds
232 * @param paint the Paint information used to blit the layer back into the layers underneath
256 * Creates a new {@link GcSnapshot} on top of another one, with a layer data to be restored
260 * @param layerBounds the region of the layer. Optional, if null, this is a normal save()
261 * @param paint the Paint information used to blit the layer back into the layers underneath
274 // only if the new layer doesn't clip drawing to itself.
275 for (Layer layer : mPrevious.mLayers) {
276 mLayers.add(layer.makeCopy());
289 // get the base layer (always at index 0)
292 // create the image for the layer
303 // because this layer inherits the current context for transform and clip,
304 // set them to one from the base layer.
308 // create a new layer for this new layer and add it to the list at the end.
315 // if the drawing is not clipped to the local layer only, we save the current content
319 // be coming from the layer itself.
324 Layer layer = mLayers.get(i);
327 graphics.drawImage(layer.getImage(),
333 layer.setOriginalCopy(image);
345 for (Layer layer : mLayers) {
346 layer.getGraphics().dispose();
390 // create a new Layer for the bitmap. This will be the base layer.
414 for (Layer layer : mLayers) {
415 layer.getGraphics().translate(dx, dy);
427 for (Layer layer : mLayers) {
428 layer.getGraphics().rotate(radians);
440 for (Layer layer : mLayers) {
441 layer.getGraphics().scale(sx, sy);
465 for (Layer layer : mLayers) {
466 layer.getGraphics().setTransform(transform);
481 for (Layer layer : mLayers) {
482 layer.clip(shape);
501 for (Layer layer : mLayers) {
502 layer.setClip(area);
553 * Note that the method can be called several times if there are more than one active layer.
563 * Note that the method can be called several times if there are more than one active layer.
573 // of saveLayer(), but that doesn't mean there's no layer.
576 // no layer, only base layer. easy case.
579 // draw in all the layers until the layer save flags tells us to stop (ie drawing
580 // in that layer is limited to the layer itself.
585 Layer layer = mLayers.get(i);
587 drawInLayer(layer, drawable, paint, compositeOnly, forceSrcMode);
589 // then go to previous layer, only if there are any left, and its flags
590 // doesn't restrict drawing to the layer itself.
592 flags = layer.getFlags();
597 private void drawInLayer(Layer layer, Drawable drawable, Paint_Delegate paint,
599 Graphics2D originalGraphics = layer.getGraphics();
619 // prepare to blit the layers in which we have draw, in the layer beneath
620 // them, starting with the top one (which is the current local layer).
639 for (Layer layer : mPrevious.mLayers) {
640 layer.getGraphics().setTransform(mtx);
647 for (Layer layer : mPrevious.mLayers) {
648 layer.setClip(clip);
653 for (Layer layer : mLayers) {
654 layer.getGraphics().dispose();
664 // if the layer contains an original copy this means the flags
665 // didn't restrict drawing to the local layer and we need to make sure the
666 // layer bounds in the layer beneath didn't receive any drawing.
680 // now draw put the content of the local layer onto the layer,