public class PaintGlLayer extends GlLayer implements RenderToCanvasLayerI, Painting.Callback
Modifier and Type | Field and Description |
---|---|
protected boolean |
ignoreEvents |
protected boolean |
isAvailable |
protected boolean |
isValidEventChain |
static int |
MAX_POINTS_DRAWN_PER_FRAME |
protected Painting |
painting |
stage, transformationGlSafe, transformationUiSafe
isAttached, showState, uiDensity, willDrawUi
Constructor and Description |
---|
PaintGlLayer(StateHandler stateHandler,
BrushSettings brushSettings) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
android.graphics.Rect |
getResultRect(android.graphics.Rect fullImageRegion,
float subSample) |
void |
glSetup() |
boolean |
isRelativeToCrop() |
boolean |
needFullImageRegion() |
protected void |
onAttachedToUI(StateHandler stateHandler) |
protected void |
onDetachedFromUI(StateHandler stateHandler) |
protected void |
onDrawLayer() |
void |
onMotionEvent(TransformedMotionEvent event) |
void |
paintingChunkCreate(Painting painting,
PaintChunk newChunk) |
void |
paintingChunkDestroy(Painting painting,
PaintChunk removedChunk) |
void |
paintingChunkFinished() |
void |
paintingChunkListChanged(Painting painting) |
void |
paintingHasChanged(Painting painting) |
void |
renderToCanvas(android.graphics.Canvas canvas,
android.graphics.Rect layerStage,
android.graphics.Rect chunkRect,
Transformation transformation) |
void |
setImageRect(android.graphics.Rect rect) |
glDrawLayer, onActivated, onDeactivated
doRespondOnClick, getResources, render, setTransformation
getStateHandler, isEnabled, onAttached, onDetached, onDrawUI, onSizeChanged, postInvalidateUi, setWillDrawUi
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doRespondOnClick, onActivated, onAttached, onDeactivated, onDetached, onSizeChanged, setTransformation
public static int MAX_POINTS_DRAWN_PER_FRAME
protected Painting painting
protected boolean isAvailable
protected boolean ignoreEvents
protected boolean isValidEventChain
public PaintGlLayer(StateHandler stateHandler, BrushSettings brushSettings)
public void glSetup()
glSetup
in class GlLayerBase
protected void onDetachedFromUI(StateHandler stateHandler)
onDetachedFromUI
in class LayerBase
@MainThread public void onMotionEvent(@NonNull TransformedMotionEvent event)
onMotionEvent
in interface LayerI
onMotionEvent
in class GlLayerBase
public boolean isRelativeToCrop()
isRelativeToCrop
in interface LayerI
protected void onAttachedToUI(StateHandler stateHandler)
onAttachedToUI
in class LayerBase
@WorkerThread public void renderToCanvas(android.graphics.Canvas canvas, android.graphics.Rect layerStage, android.graphics.Rect chunkRect, Transformation transformation)
renderToCanvas
in interface RenderToCanvasLayerI
public android.graphics.Rect getResultRect(android.graphics.Rect fullImageRegion, float subSample)
getResultRect
in interface ProcessableLayerI
getResultRect
in interface RenderToCanvasLayerI
public boolean needFullImageRegion()
needFullImageRegion
in interface ProcessableLayerI
needFullImageRegion
in interface RenderToCanvasLayerI
@MainThread public void setImageRect(@NonNull android.graphics.Rect rect)
setImageRect
in interface LayerI
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void paintingHasChanged(@NonNull Painting painting)
paintingHasChanged
in interface Painting.Callback
public void paintingChunkFinished()
public void paintingChunkCreate(@NonNull Painting painting, PaintChunk newChunk)
paintingChunkCreate
in interface Painting.Callback
public void paintingChunkDestroy(@NonNull Painting painting, PaintChunk removedChunk)
paintingChunkDestroy
in interface Painting.Callback
public void paintingChunkListChanged(@NonNull Painting painting)
paintingChunkListChanged
in interface Painting.Callback
protected void onDrawLayer()
onDrawLayer
in class GlLayer