RootCanvasView

Hierarchy

  • View

    RootCanvasView

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

+ new RootCanvasView(context: Context, canvas: Canvas): RootCanvasView

Overrides View.constructor

Parameters:

Returns: RootCanvasView

Properties

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

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

Accessors

innerHeight

get innerHeight(): number

Inherited from RootCanvasView.innerHeight

Returns: number


innerWidth

get innerWidth(): number

Inherited from RootCanvasView.innerWidth

Returns: number

Methods

addChild

addChild(child: View, position: number): void

Inherited from RootCanvasView.addChild

Parameters:

Returns: void


destroy

destroy(): void

Inherited from RootCanvasView.destroy

Returns: void


dispatchPointerEvent

dispatchPointerEvent(event: CanvasPointerEvent): boolean

Inherited from RootCanvasView.dispatchPointerEvent

Parameters:

Returns: boolean


draw

draw(canvas: ViewCanvas): void

Overrides TextView.draw

Parameters:

Returns: void


getBackgroundColor

getBackgroundColor(): undefined | string

Inherited from RootCanvasView.getBackgroundColor

Returns: undefined | string


getBorder

getBorder(): undefined | string

Inherited from RootCanvasView.getBorder

Returns: undefined | string


getBorderColor

getBorderColor(): undefined | string

Inherited from RootCanvasView.getBorderColor

Returns: undefined | string


getCanvas

getCanvas(): HTMLCanvasElement

Returns: HTMLCanvasElement


getId

getId(): undefined | string | number

Inherited from RootCanvasView.getId

Returns: undefined | string | number


getInternalWrappedHeight

getInternalWrappedHeight(_canvas: ViewCanvas): number | undefined

Inherited from RootCanvasView.getInternalWrappedHeight

Parameters:

Returns: number | undefined


getInternalWrappedWidth

getInternalWrappedWidth(_canvas: ViewCanvas): number | undefined

Inherited from RootCanvasView.getInternalWrappedWidth

Parameters:

Returns: number | undefined


getLayoutParams

getLayoutParams(): LayoutParams‹›

Inherited from RootCanvasView.getLayoutParams

Returns: LayoutParams‹›


getMatchParentHeight

getMatchParentHeight(): number

Inherited from RootCanvasView.getMatchParentHeight

Returns: number


getMatchParentWidth

getMatchParentWidth(): number

Inherited from RootCanvasView.getMatchParentWidth

Returns: number


getOnMount

getOnMount(): undefined | function

Inherited from RootCanvasView.getOnMount

Returns: undefined | function


getParent

getParent(): null | ViewViewProps

Inherited from RootCanvasView.getParent

Returns: null | ViewViewProps


getRootView

getRootView(): ViewViewProps

Inherited from RootCanvasView.getRootView

Returns: ViewViewProps


getScale

getScale(): number

Returns: number


getVisibility

getVisibility(): Visibility

Inherited from RootCanvasView.getVisibility

Returns: Visibility


hasParent

hasParent(): boolean

Inherited from RootCanvasView.hasParent

Returns: boolean


layout

layout(force?: undefined | false | true): void

Inherited from RootCanvasView.layout

Prepares the layout for all children

Parameters:

Returns: void


measure

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

mount(): void

Inherited from RootCanvasView.mount

Returns: void


onDestroy

onDestroy(): void

Overrides TextView.onDestroy

Returns: void


onDraw

onDraw(_canvas: ViewCanvas): void

Inherited from RootCanvasView.onDraw

Parameters:

Returns: void


onLayout

onLayout(): void

Inherited from RootCanvasView.onLayout

Returns: void


onMeasure

onMeasure(width: number, height: number): object

Inherited from RootCanvasView.onMeasure

Parameters:

Returns: object

  • height: number

  • width: number


onPointerEvent

onPointerEvent(_event: CanvasPointerEvent): boolean

Inherited from RootCanvasView.onPointerEvent

Parameters:

Returns: boolean


onSizeChanged

onSizeChanged(): void

Overrides TextView.onSizeChanged

Returns: void


onSnapshot

onSnapshot(): object

Overrides View.onSnapshot

Returns: object

  • dpr: number = this.dpr


removeChild

removeChild(child: View | number): void

Inherited from RootCanvasView.removeChild

Parameters:

Returns: void


removeChildAt

removeChildAt(startIndex: number, endIndex: number): void

Inherited from RootCanvasView.removeChildAt

Parameters:

Returns: void


require

require(requiredChanges: RequiredViewChanges): void

Overrides TextView.require

Parameters:

Returns: void


requireGuard

requireGuard(requiredChanges: RequiredViewChanges): boolean

Inherited from RootCanvasView.requireGuard

Parameters:

Returns: boolean


requireGuardAndTake

requireGuardAndTake(requiredChanges: RequiredViewChanges, force?: undefined | false | true): boolean

Inherited from RootCanvasView.requireGuardAndTake

Parameters:

Returns: boolean


resolvePositionDependencies

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

run(): void

Returns: void


screenshot

screenshot(): string | undefined

Inherited from RootCanvasView.screenshot

Returns: string | undefined


setBackgroundColor

setBackgroundColor(backgroundColor: string | undefined): void

Inherited from RootCanvasView.setBackgroundColor

Parameters:

Returns: void


setBorder

setBorder(borderRect: RectLike | undefined): void

Inherited from RootCanvasView.setBorder

Parameters:

Returns: void


setBorderColor

setBorderColor(borderColor: string | undefined): void

Inherited from RootCanvasView.setBorderColor

Parameters:

Returns: void


setChildAt

setChildAt(child: View, position: number): void

Inherited from RootCanvasView.setChildAt

Parameters:

Returns: void


setDebugEnabled

setDebugEnabled(enabled: boolean): void

Parameters:

Returns: void


setId

setId(id?: undefined | string): void

Inherited from RootCanvasView.setId

Parameters:

Returns: void


setLayoutParams

setLayoutParams(lp: LayoutParams): void

Inherited from RootCanvasView.setLayoutParams

Parameters:

Returns: void


setOnMount

setOnMount(callback: function): void

Inherited from RootCanvasView.setOnMount

Parameters:

callback: function

▸ (view: View‹any›): void

Parameters:

Returns: void


setVisibility

setVisibility(visibility: Visibility): void

Inherited from RootCanvasView.setVisibility

Parameters:

Returns: void


setupPointerEvents

setupPointerEvents(): void

Returns: void


snapshot

snapshot(): object

Inherited from RootCanvasView.snapshot

Returns: object

Last updated