↳ RootCanvasView
+ new RootCanvasView(context
: Context, canvas
: Canvas): RootCanvasView
Overrides View.constructor
Parameters:
Returns: RootCanvasView
Protected
Optional
backgroundColor• backgroundColor? : undefined | string
Inherited from RootCanvasView.backgroundColor
Protected
Optional
borderColor• borderColor? : undefined | string
Inherited from RootCanvasView.borderColor
Protected
Optional
borderRect• borderRect? : Rect
Inherited from RootCanvasView.borderRect
Readonly
context• context: Context
Inherited from RootCanvasView.context
Protected
height• height: number = 0
Inherited from RootCanvasView.height
Optional
id• id? : undefined | number
Inherited from RootCanvasView.id
Protected
innerRect• innerRect: Rect = new Rect(0)
Inherited from RootCanvasView.innerRect
This are the bounds of view including padding.
Protected
lp• lp: LayoutParams = new LayoutParams()
Inherited from RootCanvasView.lp
Readonly
name• name: string
Inherited from RootCanvasView.name
• offsetRect: Rect = new Rect(0)
Inherited from RootCanvasView.offsetRect
This are the bounds of view absolute offset.
Protected
Optional
onMount• onMount? : undefined | function
Inherited from RootCanvasView.onMount
Protected
rect• rect: Rect = new Rect(0)
Inherited from RootCanvasView.rect
This are bounds of a view including margin and padding
Protected
visibility• visibility: Visibility = Visibility.VISIBLE
Inherited from RootCanvasView.visibility
Protected
width• width: number = 0
Inherited from RootCanvasView.width
• get innerHeight(): number
Inherited from RootCanvasView.innerHeight
Returns: number
• get innerWidth(): number
Inherited from RootCanvasView.innerWidth
Returns: number
▸ addChild(child
: View, position
: number): void
Inherited from RootCanvasView.addChild
Parameters:
Returns: void
▸ destroy(): void
Inherited from RootCanvasView.destroy
Returns: void
▸ dispatchPointerEvent(event
: CanvasPointerEvent): boolean
Inherited from RootCanvasView.dispatchPointerEvent
Parameters:
Returns: boolean
▸ draw(canvas
: ViewCanvas): void
Parameters:
Returns: void
▸ getBackgroundColor(): undefined | string
Inherited from RootCanvasView.getBackgroundColor
Returns: undefined | string
▸ getBorder(): undefined | string
Inherited from RootCanvasView.getBorder
Returns: undefined | string
▸ getBorderColor(): undefined | string
Inherited from RootCanvasView.getBorderColor
Returns: undefined | string
▸ getCanvas(): HTMLCanvasElement
Returns: HTMLCanvasElement
▸ getId(): undefined | string | number
Inherited from RootCanvasView.getId
Returns: undefined | string | number
▸ getInternalWrappedHeight(_canvas
: ViewCanvas): number | undefined
Inherited from RootCanvasView.getInternalWrappedHeight
Parameters:
Returns: number | undefined
▸ getInternalWrappedWidth(_canvas
: ViewCanvas): number | undefined
Inherited from RootCanvasView.getInternalWrappedWidth
Parameters:
Returns: number | undefined
▸ getLayoutParams(): LayoutParams‹›
Inherited from RootCanvasView.getLayoutParams
Returns: LayoutParams‹›
▸ getMatchParentHeight(): number
Inherited from RootCanvasView.getMatchParentHeight
Returns: number
▸ getMatchParentWidth(): number
Inherited from RootCanvasView.getMatchParentWidth
Returns: number
▸ getOnMount(): undefined | function
Inherited from RootCanvasView.getOnMount
Returns: undefined | function
▸ getParent(): null | View‹ViewProps›
Inherited from RootCanvasView.getParent
Returns: null | View‹ViewProps›
▸ getRootView(): View‹ViewProps›
Inherited from RootCanvasView.getRootView
▸ getScale(): number
Returns: number
▸ getVisibility(): Visibility
Inherited from RootCanvasView.getVisibility
Returns: Visibility
▸ hasParent(): boolean
Inherited from RootCanvasView.hasParent
Returns: boolean
▸ layout(force?
: undefined | false | true): void
Inherited from RootCanvasView.layout
Prepares the layout for all children
Parameters:
Returns: void
▸ measure(canvas
: ViewCanvas, force?
: undefined | false | true): void
Inherited from RootCanvasView.measure
Measures the component and adjusts it's dimensions to min/max width and height values.
Parameters:
Returns: void
true if width or height changed, false otherwise
▸ mount(): void
Inherited from RootCanvasView.mount
Returns: void
▸ onDestroy(): void
Returns: void
▸ onDraw(_canvas
: ViewCanvas): void
Inherited from RootCanvasView.onDraw
Parameters:
Returns: void
▸ onLayout(): void
Inherited from RootCanvasView.onLayout
Returns: void
▸ onMeasure(width
: number, height
: number): object
Inherited from RootCanvasView.onMeasure
Parameters:
Returns: object
height: number
width: number
▸ onPointerEvent(_event
: CanvasPointerEvent): boolean
Inherited from RootCanvasView.onPointerEvent
Parameters:
Returns: boolean
▸ onSizeChanged(): void
Overrides TextView.onSizeChanged
Returns: void
▸ onSnapshot(): object
Overrides View.onSnapshot
Returns: object
dpr: number = this.dpr
▸ removeChild(child
: View | number): void
Inherited from RootCanvasView.removeChild
Parameters:
Returns: void
▸ removeChildAt(startIndex
: number, endIndex
: number): void
Inherited from RootCanvasView.removeChildAt
Parameters:
Returns: void
▸ require(requiredChanges
: RequiredViewChanges): void
Parameters:
Returns: void
▸ requireGuard(requiredChanges
: RequiredViewChanges): boolean
Inherited from RootCanvasView.requireGuard
Parameters:
Returns: boolean
▸ requireGuardAndTake(requiredChanges
: RequiredViewChanges, force?
: undefined | false | true): boolean
Inherited from RootCanvasView.requireGuardAndTake
Parameters:
Returns: boolean
▸ resolvePositionDependencies(): void
Inherited from RootCanvasView.resolvePositionDependencies
Prepare arrays of children ordered horizontally and vertically, so that they could be measured in a single pass, without waiting for their dependencies to be resolved.
This has to be called before measure whenever child's layoutParams change or views are added/removed.
throws
an error in case of unresolvable dependency (circular or lack of required view)
Returns: void
▸ run(): void
Returns: void
▸ screenshot(): string | undefined
Inherited from RootCanvasView.screenshot
Returns: string | undefined
▸ setBackgroundColor(backgroundColor
: string | undefined): void
Inherited from RootCanvasView.setBackgroundColor
Parameters:
Returns: void
▸ setBorder(borderRect
: RectLike | undefined): void
Inherited from RootCanvasView.setBorder
Parameters:
Returns: void
▸ setBorderColor(borderColor
: string | undefined): void
Inherited from RootCanvasView.setBorderColor
Parameters:
Returns: void
▸ setChildAt(child
: View, position
: number): void
Inherited from RootCanvasView.setChildAt
Parameters:
Returns: void
▸ setDebugEnabled(enabled
: boolean): void
Parameters:
Returns: void
▸ setId(id?
: undefined | string): void
Inherited from RootCanvasView.setId
Parameters:
Returns: void
▸ setLayoutParams(lp
: LayoutParams): void
Inherited from RootCanvasView.setLayoutParams
Parameters:
Returns: void
▸ setOnMount(callback
: function): void
Inherited from RootCanvasView.setOnMount
Parameters:
▪ callback: function
▸ (view
: View‹any›): void
Parameters:
Returns: void
▸ setVisibility(visibility
: Visibility): void
Inherited from RootCanvasView.setVisibility
Parameters:
Returns: void
▸ setupPointerEvents(): void
Returns: void
▸ snapshot(): object
Inherited from RootCanvasView.snapshot
Returns: object
Name | Type |
---|---|
Name | Type | Default |
---|---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type | Default |
---|---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type | Default |
---|---|---|
context
canvas
child
-
position
number
-1
event
canvas
_canvas
_canvas
force?
undefined | false | true
canvas
force?
undefined | false | true
_canvas
width
number
height
number
_event
child
View | number
startIndex
number
-
endIndex
number
startIndex + 1
requiredChanges
requiredChanges
requiredChanges
force?
undefined | false | true
backgroundColor
string | undefined
borderRect
RectLike | undefined
borderColor
string | undefined
child
position
number
enabled
boolean
id?
undefined | string
lp
view
View‹any›
visibility
Visibility.VISIBLE