public abstract class ARTVirtualNode extends ReactShadowNodeImpl
ARTGroupShadowNode
, ARTShapeShadowNode
and
indirectly for ARTTextShadowNode
.Modifier and Type | Field and Description |
---|---|
protected static float |
MIN_OPACITY_FOR_DRAW |
protected float |
mOpacity |
protected float |
mScale |
Modifier | Constructor and Description |
---|---|
|
ARTVirtualNode() |
protected |
ARTVirtualNode(ARTVirtualNode 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, calculateLayout, copy, dirty, dispatchUpdates, dispose, getChildAt, getChildCount, getChildrenList, getHierarchyInfo, getInstanceHandle, getLayoutDirection, getLayoutHeight, getLayoutWidth, getLayoutX, getLayoutY, getNativeChildCount, getNativeOffsetForChild, getNativeParent, getNewProps, getOriginalReactShadowNode, getPadding, getParent, getReactTag, getRootTag, getScreenHeight, getScreenWidth, getScreenX, getScreenY, getStyleHeight, getStylePadding, getStyleWidth, getThemedContext, getTotalNativeChildren, getViewClass, hasNewLayout, hasUnseenUpdates, hasUpdates, indexOf, indexOfNativeChild, isDescendantOf, isDirty, isLayoutOnly, isMeasureDefined, isVirtualAnchor, isYogaLeafNode, markLayoutSeen, markUpdated, markUpdateSeen, mutableCopy, mutableCopyWithNewChildren, mutableCopyWithNewChildrenAndProps, mutableCopyWithNewProps, onAfterUpdateTransaction, onBeforeLayout, onCollectExtraUpdates, removeAllNativeChildren, removeAndDisposeAllChildren, removeChildAt, removeNativeChildAt, setAlignContent, setAlignItems, setAlignSelf, setBaselineFunction, setBorder, setDefaultPadding, setDisplay, setFlex, setFlexBasis, setFlexBasisAuto, setFlexBasisPercent, setFlexDirection, setFlexGrow, setFlexShrink, setFlexWrap, setInstanceHandle, setIsLayoutOnly, setJustifyContent, setLayoutDirection, setLocalData, setMargin, setMarginAuto, setMarginPercent, setMeasureFunction, setOriginalReactShadowNode, setOverflow, setPadding, setPaddingPercent, setPosition, setPositionPercent, setPositionType, setReactTag, setRootTag, setShouldNotifyOnLayout, setStyleAspectRatio, setStyleHeight, setStyleHeightAuto, setStyleHeightPercent, setStyleMaxHeight, setStyleMaxHeightPercent, setStyleMaxWidth, setStyleMaxWidthPercent, setStyleMinHeight, setStyleMinHeightPercent, setStyleMinWidth, setStyleMinWidthPercent, setStyleWidth, setStyleWidthAuto, setStyleWidthPercent, setThemedContext, setViewClassName, shouldNotifyOnLayout, toString, updateProperties
protected static final float MIN_OPACITY_FOR_DRAW
protected float mOpacity
protected final float mScale
public ARTVirtualNode()
protected ARTVirtualNode(ARTVirtualNode artVirtualNode)
public boolean isVirtual()
ReactShadowNodeImpl
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 interface ReactShadowNode<ReactShadowNodeImpl>
isVirtual
in class ReactShadowNodeImpl
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()