Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Abstract
onGestureEvent▸ onGestureEvent(event
: CanvasPointerEvent, previousEvent
: CanvasPointerEvent): boolean
Parameters:
Returns: boolean
▸ onPointerEvent(event
: CanvasPointerEvent): boolean
Parameters:
Returns: boolean
Name
Type
event
previousEvent
Name
Type
event
↳ ImageView
+ new ImageView(context
: Context): ImageView
Overrides View.constructor
Parameters:
Returns: ImageView
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, force
: boolean): 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
▸ getId(): undefined | string | number
Inherited from RootCanvasView.getId
Returns: undefined | string | number
▸ getInternalWrappedHeight(): number
Overrides RootCanvasView.getInternalWrappedHeight
Returns: number
▸ getInternalWrappedWidth(): number
Overrides RootCanvasView.getInternalWrappedWidth
Returns: number
▸ 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
▸ getScaleType(): ImageScaleType
Returns: ImageScaleType
▸ getSource(): undefined | string
Returns: undefined | string
▸ 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
Inherited from TextView.onDestroy
Returns: void
▸ onDraw(canvas
: ViewCanvas): void
Overrides 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(_width
: number, _height
: number, _oldWidth
: number, _oldHeight
: number): void
Inherited from TextView.onSizeChanged
Parameters:
Returns: void
▸ onSnapshot(): object
Overrides View.onSnapshot
Returns: object
source: undefined | string = this.source
▸ 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
Inherited from TextView.require
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
▸ 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
▸ 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
▸ setScaleType(scaleType
: ImageScaleType): void
Parameters:
Returns: void
▸ setSource(source
: string): void
Parameters:
Returns: void
▸ setVisibility(visibility
: Visibility): void
Inherited from RootCanvasView.setVisibility
Parameters:
Returns: void
▸ snapshot(): object
Inherited from RootCanvasView.snapshot
Returns: object
↳ AreaSelectGestureDetector
+ new AreaSelectGestureDetector(options
: AreaSelectGestureDetectorOptions): AreaSelectGestureDetector
Parameters:
Returns: AreaSelectGestureDetector
▸ onGestureEvent(event
: CanvasPointerEvent): boolean
Overrides GestureDetector.onGestureEvent
Parameters:
Returns: boolean
▸ onPointerEvent(event
: CanvasPointerEvent): boolean
Inherited from GestureDetector.onPointerEvent
Parameters:
Returns: boolean
Draw on Canvas using Views
Kanva is a canvas framework for Node.js & browser web apps, inspired by structures present in Android ecosystem.
Kanva is broken down into several packages, allowing you to pick what's really needed.
Most important yarn
scripts during development:
start
- runs builds for all packages in watch mode
verify
- runs lint & tests
Line
Parameters:
• endX: number
• endY: number
• startX: number
• startY: number
Parameters:
Returns: this
▸ add(x
: number, y
: number): this
Parameters:
Returns: this
Returns a copy of Line that can be mutated separately.
Copies all of this Line's properties to a Line specified in an argument. Returns the line passed as argument.
Parameters:
▸ extend(distance
: number): this
Extends this line by a specified distance. Starting point remains the same, ending point changes it's place by the distance. If current line has the length of 0, it's extended horizontally. Resulting Line is the same, mutated Line.
Parameters:
Returns: this
▸ length(): number
Returns: number
▸ move(distance
: number): this
Moves this line by a specified distance on the same angle. Acting similarly to {@link Line#extend}, but modifies both starting and ending points by a specified distance. If current line has the length of 0, it's moved horizontally. Resulting Line is the same, mutated Line.
Parameters:
Returns: this
Parameters:
Returns: this
▸ offset(x
: number, y
: number): this
Parameters:
Returns: this
Returns a point on this line, at specified position (ranged from 0 to 1). I.e. to get the center of line, pass 0.5. Creates a new Point, but in order to reuse the existing one, you can pass it as a second argument.
Parameters:
▸ toString(): string
Returns: string
NoContext
▸ deregisterView(_id
: number): void
Parameters:
Returns: void
▸ getId(_id
: string | number): string | number
Parameters:
Returns: string | number
▸ registerView(_idName
: string): number
Parameters:
Returns: number
▸ resolve(_id
: string | number | undefined): number | undefined
Parameters:
Returns: number | undefined
Context
Parameters:
Readonly
canvasCreator• debugEnabled: boolean = false
Readonly
imageClass▸ deregisterView(id
: number): void
Parameters:
Returns: void
▸ getId(id
: string | number | undefined): undefined | string | number
Parameters:
Returns: undefined | string | number
▸ registerView(idName
: string): number
Parameters:
Returns: number
▸ resolve(id
: string | number | undefined): number | undefined
Parameters:
Returns: number | undefined
Paint
Optional
fillStyle• fillStyle? : undefined | string
• fontString: string = defaultPaintOptions.font
• lineDash: number[] = defaultPaintOptions.lineDash
• lineRounding: boolean = defaultPaintOptions.lineRounding
• lineWidth: number = defaultPaintOptions.lineWidth
Optional
strokeStyle• strokeStyle? : undefined | string
• textDirection: CanvasDirection = defaultPaintOptions.textDirection
Static
Readonly
DEFAULT▸ canDrawFill(): boolean
Returns: boolean
▸ canDrawStroke(): boolean
Returns: boolean
▸ canDrawText(): boolean
Returns: boolean
▸ getLineHeight(): number
Returns: number
▸ isBright(): boolean
Returns: boolean
▸ setFillStyle(fill
: string): this
Parameters:
Returns: this
Parameters:
Returns: this
▸ setLineDash(lineDash
: number[]): this
Parameters:
Returns: this
▸ setLineRounding(lineRounding
: boolean): this
Parameters:
Returns: this
▸ setLineWidth(lineWidth
: number): this
Parameters:
Returns: this
▸ setStrokeStyle(stroke
: string): this
Parameters:
Returns: this
Parameters:
Returns: this
Parameters:
Returns: this
▸ setTextDirection(textDirection
: CanvasDirection): this
Parameters:
Returns: this
▸ snapshot(): object
Returns: object
CanvasPointerEvent
• pointerCount: number = 0
• scrollX: number = 0
• scrollY: number = 0
• scrollZ: number = 0
Parameters:
▸ offsetPointers(offsetX
: number, offsetY
: number): void
Parameters:
Returns: void
Name | Type |
---|---|
Name | Type | Default |
---|---|---|
Name | Type |
---|---|
Name | Type | Default |
---|---|---|
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 |
---|---|
Name | Type | Default |
---|---|---|
+ new Line():
Returns:
+ new Line(startX
: number, startY
: number, endX
: number, endY
: number):
Returns:
▸ add(line
: | ): this
▸ clone(): ‹›
Returns: ‹›
▸ cloneTo(line
: ): ‹›
Returns: ‹›
▸ offset(line
: | ): this
▸ pointAt(position
: number, result
: ):
Returns:
Implementation of
Implementation of
Returns:
▸ onGestureEvent(event
: ): boolean
Overrides .
▸ onPointerEvent(event
: ): boolean
Inherited from .
+ new Context(options
: ):
Name | Type | Default |
---|
Returns:
• canvasCreator:
• imageClass:
Name | Type |
---|
Implementation of
Name | Type |
---|
Implementation of
Name | Type |
---|
Implementation of
Name | Type |
---|
Implementation of .
• font: = defaultFont
Implementation of .
• textAlign: = defaultPaintOptions.textAlign
Implementation of .
• textBaseline: = defaultPaintOptions.textBaseline
Implementation of .
Implementation of .
▪ DEFAULT: ‹› = new Paint()
▸ clone(): ‹›
Returns: ‹›
Name | Type |
---|
▸ setFont(font
: ): this
Name | Type |
---|
Name | Type |
---|
Name | Type |
---|
Name | Type |
---|
Name | Type |
---|
▸ setTextAlign(textAlign
: ): this
Name | Type |
---|
▸ setTextBaseline(textBaseline
: ): this
Name | Type |
---|
Name | Type |
---|
+ new CanvasPointerEvent():
Returns:
• action:
• offset:
• pointers: [] = new Array(10).fill(null).map(() => ({}) as any)
• target:
• get primaryPointer():
Returns:
▸ clone():
Returns:
▸ cloneTo(event
: ):
Returns:
Package
Description
Core of Kanva
React bindings for Kanva core.
Chart views in Kanva
@kanva/charts-react
React bindings for chart views in Kanva
@kanva/example
Storybook showcase of Kanva's possibilities
context
child
-
position
number
-1
event
canvas
-
force
boolean
false
force?
undefined | false | true
canvas
force?
undefined | false | true
canvas
width
number
height
number
_event
_width
number
_height
number
_oldWidth
number
_oldHeight
number
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
id?
undefined | string
lp
view
View‹any›
scaleType
source
string
visibility
Visibility.VISIBLE
Name
Type
options
AreaSelectGestureDetectorOptions
Name
Type
event
Name
Type
event
Name | Type |
| number |
| number |
| number |
| number |
Name | Type |
| number |
| number |
Name | Type |
| number |
Name | Type |
| number |
Name | Type |
| number |
| number |
Name | Type |
| number |
Name | Type |
| string | number |
Name | Type |
| string |
Name | Type |
| string | number | undefined |
| number |
| string | number | undefined |
| string |
| string | number | undefined |
| string |
| number[] |
| boolean |
| number |
| string |
| CanvasDirection |
Name | Type |
| number |
| number |
Name | Type |
|
Name | Type |
|
Name | Type |
|
Name | Type | Default |
| number | - |
| new Point() |
Name | Type |
|
Name | Type |
|
Name | Type |
|
| {} |
|
|
|
Name | Type |
|
Rect
+ new Rect(value
: RectInput): Rect
Parameters:
Returns: Rect
• b: number
• l: number
• r: number
• t: number
• get height(): number
Returns: number
• get width(): number
Returns: number
▸ clone(): Rect‹›
Returns a copy of Rect that can be mutated separately.
Returns: Rect‹›
Copies all of this Rect's properties to a Rect specified in an argument. Returns the line passed as argument.
Parameters:
Returns: Rect‹›
▸ contains(x
: number, y
: number): boolean
Parameters:
Returns: boolean
▸ expand(expansion
: Rect | number): this
Expands this Rect by other Rect's dimensions (i.e. to reduce padding) or by a constant numeric value from each side. Resulting Rect is the same, mutated Rect.
Parameters:
Returns: this
▸ inset(shrink
: Rect | number): this
Shrinks this Rect by other Rect's dimensions (i.e. to apply padding) or by a constant numeric value from each side. Resulting Rect is the same, mutated Rect.
Parameters:
Returns: this
▸ intersects(rect
: Rect): boolean
Parameters:
Returns: boolean
▸ offset(offset
: Rect | Point): this
Moves this Rect by left top position of passed rect or by XY coordinates of a Point. Resulting Rect is the same, mutated Rect.
Parameters:
Returns: this
▸ offset(x
: number, y
: number): this
Moves this Rect by passed x and y coordinates. Resulting Rect is the same, mutated Rect.
Parameters:
Returns: this
▸ toString(): string
Returns: string
Static
from▸ from(rectLike
: RectLike): Rect
Parameters:
Returns: Rect
↳ TextView
+ new TextView(context
: Context): TextView
Overrides View.constructor
Parameters:
Returns: TextView
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, force
: boolean): 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
▸ getId(): undefined | string | number
Inherited from RootCanvasView.getId
Returns: undefined | string | number
▸ getInternalWrappedHeight(): number
Overrides RootCanvasView.getInternalWrappedHeight
Returns: number
▸ getInternalWrappedWidth(canvas
: ViewCanvas): undefined | number
Overrides RootCanvasView.getInternalWrappedWidth
Parameters:
Returns: undefined | number
▸ 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
▸ getText(): string
Returns: string
▸ getTextPaint(): Font
Returns: Font
▸ getVisibility(): Visibility
Inherited from RootCanvasView.getVisibility
Returns: Visibility
▸ getY(textBaseline
: TextBaseline): number
Parameters:
Returns: number
▸ 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
Inherited from TextView.onDestroy
Returns: void
▸ onDraw(canvas
: ViewCanvas): void
Overrides 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(_width
: number, _height
: number, _oldWidth
: number, _oldHeight
: number): void
Inherited from TextView.onSizeChanged
Parameters:
Returns: void
▸ onSnapshot(): object
Overrides View.onSnapshot
Returns: object
text: string = this.textString
textPaint: object = this.textPaint.snapshot()
▸ 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
Inherited from TextView.require
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
▸ 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
▸ 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
▸ setText(text
: string): void
Parameters:
Returns: void
▸ setTextPaint(paint
: Paint): void
Parameters:
Returns: void
▸ setVisibility(visibility
: Visibility): void
Inherited from RootCanvasView.setVisibility
Parameters:
Returns: void
▸ snapshot(): object
Inherited from RootCanvasView.snapshot
Returns: object
↳ ScaleGestureDetector
+ new ScaleGestureDetector(options
: ScaleGestureDetectorOptions): ScaleGestureDetector
Parameters:
Returns: ScaleGestureDetector
▸ onGestureEvent(event
: CanvasPointerEvent): boolean
Overrides GestureDetector.onGestureEvent
Parameters:
Returns: boolean
▸ onPointerEvent(event
: CanvasPointerEvent): boolean
Inherited from GestureDetector.onPointerEvent
Parameters:
Returns: boolean
LayoutParams
Optional
aboveId• aboveId? : Id = DefaultProps.ABOVE
Optional
belowId• belowId? : Id = DefaultProps.BELOW
Optional
bottomId• bottomId? : Id = DefaultProps.ALIGN_BOTTOM
• centerH: boolean = DefaultProps.CENTER_HORIZONTAL
• centerV: boolean = DefaultProps.CENTER_VERTICAL
• dependenciesModified: boolean = false
Optional
endId• endId? : Id = DefaultProps.ALIGN_END
• h: DimensionInput = DefaultProps.HEIGHT
• hDimension: Dimension = parseDimension(DefaultProps.HEIGHT)
• isAbsolute: boolean = DefaultProps.IS_ABSOLUTE
• isAnimated: boolean = DefaultProps.IS_ANIMATED
• marginRect: Rect‹› = DefaultProps.MARGIN
• maxH: number = DefaultProps.MAX_HEIGHT
• maxW: number = DefaultProps.MAX_WIDTH
• minH: number = DefaultProps.MIN_HEIGHT
• minW: number = DefaultProps.MIN_WIDTH
• paddingRect: Rect‹› = DefaultProps.PADDING
Optional
startId• startId? : Id = DefaultProps.ALIGN_START
Optional
toEndOfId• toEndOfId? : Id = DefaultProps.TO_END_OF
Optional
toStartOfId• toStartOfId? : Id = DefaultProps.TO_START_OF
Optional
topId• topId? : Id = DefaultProps.ALIGN_TOP
• w: DimensionInput = DefaultProps.WIDTH
• wDimension: Dimension = parseDimension(DefaultProps.WIDTH)
• x: DimensionInput = DefaultProps.X
• xDimension: Dimension = parseDimension(DefaultProps.X)
• y: DimensionInput = DefaultProps.Y
• yDimension: Dimension = parseDimension(DefaultProps.Y)
▸ above(id?
: Id): this
Parameters:
Returns: this
▸ absolute(absolute?
: undefined | false | true): this
Parameters:
Returns: this
▸ alignBottom(id?
: Id): this
Parameters:
Returns: this
▸ alignEnd(id?
: Id): this
Parameters:
Returns: this
▸ alignParentBottom(): this
Returns: this
▸ alignParentEnd(): this
Returns: this
▸ alignParentStart(): this
Returns: this
▸ alignParentTop(): this
Returns: this
▸ alignStart(id?
: Id): this
Parameters:
Returns: this
▸ alignTop(id?
: Id): this
Parameters:
Returns: this
▸ animate(animate?
: undefined | false | true): this
Parameters:
Returns: this
▸ asProps(): LayoutProps
Returns: LayoutProps
▸ below(id?
: Id): this
Parameters:
Returns: this
▸ center(center?
: undefined | false | true): this
Parameters:
Returns: this
▸ centerHorizontal(center?
: undefined | false | true): this
Parameters:
Returns: this
▸ centerVertical(center?
: undefined | false | true): this
Parameters:
Returns: this
▸ height(height
: DimensionInput): this
Parameters:
Returns: this
▸ margin(margin?
: RectLike): this
Parameters:
Returns: this
▸ maxHeight(maxHeight
: number): this
Parameters:
Returns: this
▸ maxWidth(maxWidth
: number): this
Parameters:
Returns: this
▸ minHeight(minHeight
: number): this
Parameters:
Returns: this
▸ minWidth(minWidth
: number): this
Parameters:
Returns: this
▸ padding(padding?
: RectLike): this
Parameters:
Returns: this
▸ posX(x
: DimensionInput): this
Parameters:
Returns: this
▸ posY(y
: DimensionInput): this
Parameters:
Returns: this
▸ toEndOf(id?
: Id): this
Parameters:
Returns: this
▸ toLeftOf(id?
: Id): this
Parameters:
Returns: this
▸ toRightOf(id?
: Id): this
Parameters:
Returns: this
▸ toStartOf(id?
: Id): this
Parameters:
Returns: this
▸ updateWithProps(__namedParameters
: object): boolean
Parameters:
▪Default value
__namedParameters: object= {}
Returns: boolean
▸ width(width
: DimensionInput): this
Parameters:
Returns: this
↳ 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
Point
+ new Point(x
: number, y
: number): Point
Parameters:
Returns: Point
• x: number
• y: number
▸ clone(): Point‹›
Returns a copy of Point that can be mutated separately.
Returns: Point‹›
▸ cloneTo(point
: Point): Point‹›
Copies all of this Point's properties to a Point specified in an argument. Returns the point passed as argument.
Parameters:
Returns: Point‹›
▸ toString(): string
Returns: string
▪ _Props: Record‹string, any›
+ new View(context
: Context, name
: string): View
Parameters:
Returns: View
Protected
Optional
backgroundColor• backgroundColor? : undefined | string
Protected
Optional
borderColor• borderColor? : undefined | string
Protected
Optional
borderRect• borderRect? : Rect
Readonly
context• context: Context
Protected
height• height: number = 0
Optional
id• id? : undefined | number
Protected
innerRect• innerRect: Rect = new Rect(0)
This are the bounds of view including padding.
Protected
lp• lp: LayoutParams = new LayoutParams()
Readonly
name• name: string
• offsetRect: Rect = new Rect(0)
This are the bounds of view absolute offset.
Protected
Optional
onMount• onMount? : undefined | function
Protected
rect• rect: Rect = new Rect(0)
This are bounds of a view including margin and padding
Protected
visibility• visibility: Visibility = Visibility.VISIBLE
Protected
width• width: number = 0
• get innerHeight(): number
Returns: number
• get innerWidth(): number
Returns: number
▸ addChild(child
: View, position
: number): void
Parameters:
Returns: void
▸ destroy(): void
Returns: void
▸ dispatchPointerEvent(event
: CanvasPointerEvent): boolean
Parameters:
Returns: boolean
▸ draw(canvas
: ViewCanvas, force
: boolean): void
Parameters:
Returns: void
▸ getBackgroundColor(): undefined | string
Returns: undefined | string
▸ getBorder(): undefined | string
Returns: undefined | string
▸ getBorderColor(): undefined | string
Returns: undefined | string
▸ getId(): undefined | string | number
Returns: undefined | string | number
▸ getInternalWrappedHeight(_canvas
: ViewCanvas): number | undefined
Parameters:
Returns: number | undefined
▸ getInternalWrappedWidth(_canvas
: ViewCanvas): number | undefined
Parameters:
Returns: number | undefined
▸ getLayoutParams(): LayoutParams‹›
Returns: LayoutParams‹›
▸ getMatchParentHeight(): number
Returns: number
▸ getMatchParentWidth(): number
Returns: number
▸ getOnMount(): undefined | function
Returns: undefined | function
▸ getParent(): null | View‹ViewProps›
Returns: null | View‹ViewProps›
▸ getRootView(): View‹ViewProps›
▸ getVisibility(): Visibility
Returns: Visibility
▸ hasParent(): boolean
Returns: boolean
▸ layout(force?
: undefined | false | true): void
Prepares the layout for all children
Parameters:
Returns: void
▸ measure(canvas
: ViewCanvas, force?
: undefined | false | true): void
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
Returns: void
▸ onDestroy(): void
Returns: void
▸ onDraw(_canvas
: ViewCanvas): void
Parameters:
Returns: void
▸ onLayout(): void
Returns: void
▸ onMeasure(width
: number, height
: number): object
Parameters:
Returns: object
height: number
width: number
▸ onPointerEvent(_event
: CanvasPointerEvent): boolean
Parameters:
Returns: boolean
▸ onSizeChanged(_width
: number, _height
: number, _oldWidth
: number, _oldHeight
: number): void
Parameters:
Returns: void
▸ onSnapshot(): object
Returns: object
▸ removeChild(child
: View | number): void
Parameters:
Returns: void
▸ removeChildAt(startIndex
: number, endIndex
: number): void
Parameters:
Returns: void
▸ require(requiredChanges
: RequiredViewChanges): void
Parameters:
Returns: void
▸ requireGuard(requiredChanges
: RequiredViewChanges): boolean
Parameters:
Returns: boolean
▸ requireGuardAndTake(requiredChanges
: RequiredViewChanges, force?
: undefined | false | true): boolean
Parameters:
Returns: boolean
▸ resolvePositionDependencies(): void
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
▸ screenshot(): string | undefined
Returns: string | undefined
▸ setBackgroundColor(backgroundColor
: string | undefined): void
Parameters:
Returns: void
▸ setBorder(borderRect
: RectLike | undefined): void
Parameters:
Returns: void
▸ setBorderColor(borderColor
: string | undefined): void
Parameters:
Returns: void
▸ setChildAt(child
: View, position
: number): void
Parameters:
Returns: void
▸ setId(id?
: undefined | string): void
Parameters:
Returns: void
▸ setLayoutParams(lp
: LayoutParams): void
Parameters:
Returns: void
▸ setOnMount(callback
: function): void
Parameters:
▪ callback: function
▸ (view
: View‹any›): void
Parameters:
Returns: void
▸ setVisibility(visibility
: Visibility): void
Parameters:
Returns: void
▸ snapshot(): object
Returns: object
ViewCanvas
+ new ViewCanvas(canvas
: Canvas): ViewCanvas
Parameters:
Returns: ViewCanvas
Protected
Readonly
canvas• canvas: Canvas
Readonly
context• context: CanvasRenderingContext2D
▸ drawPath(paint
: Paint): void
Parameters:
Returns: void
▸ drawRect(rect
: Rect, paint
: Paint, borders?
: Rect): void
Parameters:
Returns: void
▸ drawText(x
: number, y
: number, text
: string, paint
: Paint, paintOverrides?
: PaintOverrides, maxWidth
: number): void
Parameters:
Returns: void
▸ line(line
: Line): void
Parameters:
Returns: void
▸ measureText(text
: string, paint
: Paint): TextMetrics
Parameters:
Returns: TextMetrics
▸ roundRect(x
: number, y
: number, w
: number, h
: number, r
: Radius): void
Parameters:
Returns: void
▸ setPaint(paint
: Paint, paintOverrides?
: PaintOverrides): void
Parameters:
Returns: void
|
|
Name | Type |
---|---|
Name | Type | Default |
---|---|---|
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 | 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 |
---|---|
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 |
---|---|
Name | Type |
---|---|
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 |
---|---|---|
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 | 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 |
---|---|---|
Name | Type | Default |
---|---|---|
Name | Type | Default |
---|---|---|
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 | 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 | Default |
---|---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name
Type
value
Name
Type
rect
Name
Type
x
number
y
number
Name
Type
expansion
Rect | number
Name
Type
shrink
Rect | number
Name
Type
rect
Name
Type
offset
Name
Type
x
number
y
number
Name
Type
rectLike
context
child
-
position
number
-1
event
canvas
-
force
boolean
false
canvas
textBaseline
force?
undefined | false | true
canvas
force?
undefined | false | true
canvas
width
number
height
number
_event
_width
number
_height
number
_oldWidth
number
_oldHeight
number
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
id?
undefined | string
lp
view
View‹any›
text
string
paint
visibility
Visibility.VISIBLE
Name
Type
options
ScaleGestureDetectorOptions
Name
Type
event
Name
Type
event
id?
absolute?
undefined | false | true
id?
id?
id?
id?
animate?
undefined | false | true
id?
center?
undefined | false | true
center?
undefined | false | true
center?
undefined | false | true
height
margin?
maxHeight
number
maxWidth
number
minHeight
number
minWidth
number
padding?
x
y
id?
id?
id?
id?
above
undefined | string | number
DefaultProps.ABOVE
alignBottom
undefined | string | number
DefaultProps.ALIGN_BOTTOM
alignEnd
undefined | string | number
DefaultProps.ALIGN_END
alignStart
undefined | string | number
DefaultProps.ALIGN_START
alignTop
undefined | string | number
DefaultProps.ALIGN_TOP
below
undefined | string | number
DefaultProps.BELOW
centerHorizontal
boolean
DefaultProps.CENTER_HORIZONTAL
centerVertical
boolean
DefaultProps.CENTER_VERTICAL
height
null | string | number
DefaultProps.HEIGHT
isAbsolute
boolean
DefaultProps.IS_ABSOLUTE
isAnimated
boolean
DefaultProps.IS_ANIMATED
margin
DefaultProps.MARGIN
maxHeight
number
DefaultProps.MAX_HEIGHT
maxWidth
number
DefaultProps.MAX_WIDTH
minHeight
number
DefaultProps.MIN_HEIGHT
minWidth
number
DefaultProps.MIN_WIDTH
padding
DefaultProps.PADDING
posX
null | string | number
DefaultProps.X
posY
null | string | number
DefaultProps.Y
toEndOf
undefined | string | number
DefaultProps.TO_END_OF
toStartOf
undefined | string | number
DefaultProps.TO_START_OF
width
null | string | number
DefaultProps.WIDTH
width
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
Name
Type
Default
x
number
0
y
number
0
Name
Type
point
context
-
name
string
"View"
child
-
position
number
-1
event
canvas
-
force
boolean
false
_canvas
_canvas
force?
undefined | false | true
canvas
force?
undefined | false | true
_canvas
width
number
height
number
_event
_width
number
_height
number
_oldWidth
number
_oldHeight
number
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
id?
undefined | string
lp
view
View‹any›
visibility
Visibility.VISIBLE
canvas
paint
rect
paint
borders?
x
number
-
y
number
-
text
string
-
paint
-
paintOverrides?
-
maxWidth
number
0
line
text
string
paint
x
number
y
number
w
number
h
number
r
paint
paintOverrides?