public abstract class ARTVirtualNode extends ReactShadowNode
ARTGroupShadowNode
, ARTShapeShadowNode
and
indirectly for ARTTextShadowNode
.CSSNodeAPI.MeasureFunction
Modifier and Type | Field and Description |
---|---|
protected static float |
MIN_OPACITY_FOR_DRAW |
protected float |
mOpacity |
protected float |
mScale |
Constructor and Description |
---|
ARTVirtualNode() |
Modifier and Type | Method and Description |
---|---|
abstract void |
draw(android.graphics.Canvas canvas,
android.graphics.Paint paint,
float opacity) |
boolean |
isVirtual()
Nodes that return
true will be treated as "virtual" nodes. |
protected void |
restoreCanvas(android.graphics.Canvas canvas)
Restore the canvas after an element was drawn.
|
protected void |
saveAndSetupCanvas(android.graphics.Canvas canvas)
Sets up the transform matrix on the canvas before an element is drawn.
|
void |
setOpacity(float opacity) |
void |
setTransform(ReadableArray transformArray) |
protected void |
setupMatrix() |
addChildAt, addNativeChildAt, dirty, getChildAt, getNativeChildCount, getNativeOffsetForChild, getNativeParent, getParent, getReactTag, getRootNode, getScreenHeight, getScreenWidth, getScreenX, getScreenY, getThemedContext, getTotalNativeChildren, getViewClass, hasUnseenUpdates, hasUpdates, indexOfNativeChild, isLayoutOnly, isVirtualAnchor, markUpdated, markUpdateSeen, onAfterUpdateTransaction, onBeforeLayout, onCollectExtraUpdates, removeAllChildren, removeAllNativeChildren, removeChildAt, removeNativeChildAt, setDefaultPadding, setIsLayoutOnly, setPadding, setShouldNotifyOnLayout, setThemedContext, shouldNotifyOnLayout, updateProperties
calculateLayout, getAlignContent, getAlignItems, getAlignSelf, getBorder, getChildCount, getData, getFlex, getFlexBasis, getFlexDirection, getFlexGrow, getFlexShrink, getJustifyContent, getLayoutDirection, getLayoutHeight, getLayoutWidth, getLayoutX, getLayoutY, getMargin, getOverflow, getPadding, getPosition, getPositionType, getStyleDirection, getStyleHeight, getStyleMaxHeight, getStyleMaxWidth, getStyleMinHeight, getStyleMinWidth, getStyleWidth, hasNewLayout, indexOf, init, isDirty, isMeasureDefined, isTextNode, markLayoutSeen, reset, setAlignContent, setAlignItems, setAlignSelf, setBorder, setData, setDirection, setFlex, setFlexBasis, setFlexDirection, setFlexGrow, setFlexShrink, setIsTextNode, setJustifyContent, setMargin, setMeasureFunction, setOverflow, setPosition, setPositionType, setStyleHeight, setStyleMaxHeight, setStyleMaxWidth, setStyleMinHeight, setStyleMinWidth, setStyleWidth, setWrap, toString, valuesEqual
protected static final float MIN_OPACITY_FOR_DRAW
protected float mOpacity
protected final float mScale
public boolean isVirtual()
ReactShadowNode
true
will be treated as "virtual" nodes. That is, nodes that are not
mapped into native views (e.g. nested text node). By default this method returns false
.isVirtual
in class ReactShadowNode
public abstract void draw(android.graphics.Canvas canvas, android.graphics.Paint paint, float opacity)
protected final void saveAndSetupCanvas(android.graphics.Canvas canvas)
canvas
- the canvas to set upprotected void restoreCanvas(android.graphics.Canvas canvas)
saveAndSetupCanvas(android.graphics.Canvas)
.canvas
- the canvas to restorepublic void setOpacity(float opacity)
public void setTransform(@Nullable ReadableArray transformArray)
protected void setupMatrix()