Search…
ImageView

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

+ new ImageView(context: Context): ImageView
Overrides View.constructor
Parameters:
Name
Type
context
Context
Returns: ImageView

Properties

Protected Optional backgroundColor

backgroundColor? : undefined | string

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:
Name
Type
Default
child
View
-
position
number
-1
Returns: void

destroy

destroy(): void
Inherited from RootCanvasView.destroy
Returns: void

dispatchPointerEvent

dispatchPointerEvent(event: CanvasPointerEvent): boolean
Parameters:
Name
Type
Returns: boolean

draw

draw(canvas: ViewCanvas, force: boolean): void
Inherited from TextView.draw
Parameters:
Name
Type
Default
canvas
-
force
boolean
false
Returns: void

getBackgroundColor

getBackgroundColor(): undefined | string
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

getId

getId(): undefined | string | number
Inherited from RootCanvasView.getId
Returns: undefined | string | number

getInternalWrappedHeight

getInternalWrappedHeight(): number
Returns: number

getInternalWrappedWidth

getInternalWrappedWidth(): number
Returns: number

getLayoutParams

getLayoutParams(): LayoutParams‹›
Returns: LayoutParams‹›

getMatchParentHeight

getMatchParentHeight(): number
Returns: number

getMatchParentWidth

getMatchParentWidth(): number
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

getScaleType

getScaleType(): ImageScaleType
Returns: ImageScaleType

getSource

getSource(): undefined | string
Returns: undefined | string

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:
Name
Type
force?
undefined | false | true
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:
Name
Type
canvas
force?
undefined | false | true
Returns: void
true if width or height changed, false otherwise

mount

mount(): void
Inherited from RootCanvasView.mount
Returns: void

onDestroy

onDestroy(): void
Inherited from TextView.onDestroy
Returns: void

onDraw

onDraw(canvas: ViewCanvas): void
Overrides RootCanvasView.onDraw
Parameters:
Name
Type
canvas
Returns: void

onLayout

onLayout(): void
Inherited from RootCanvasView.onLayout
Returns: void

onMeasure

onMeasure(width: number, height: number): object
Inherited from RootCanvasView.onMeasure
Parameters:
Name
Type
width
number
height
number
Returns: object
  • height: number
  • width: number

onPointerEvent

onPointerEvent(_event: CanvasPointerEvent): boolean
Inherited from RootCanvasView.onPointerEvent
Parameters:
Name
Type
_event
Returns: boolean

onSizeChanged

onSizeChanged(_width: number, _height: number, _oldWidth: number, _oldHeight: number): void
Inherited from TextView.onSizeChanged
Parameters:
Name
Type
_width
number
_height
number
_oldWidth
number
_oldHeight
number
Returns: void

onSnapshot

onSnapshot(): object
Overrides View.onSnapshot
Returns: object
  • source: undefined | string = this.source

removeChild

removeChild(child: View | number): void
Inherited from RootCanvasView.removeChild
Parameters:
Name
Type
child
View | number
Returns: void

removeChildAt

removeChildAt(startIndex: number, endIndex: number): void
Inherited from RootCanvasView.removeChildAt
Parameters:
Name
Type
Default
startIndex
number
-
endIndex
number
startIndex + 1
Returns: void

require

require(requiredChanges: RequiredViewChanges): void
Inherited from TextView.require
Parameters:
Name
Type
requiredChanges
Returns: void

requireGuard

requireGuard(requiredChanges: RequiredViewChanges): boolean
Inherited from RootCanvasView.requireGuard
Parameters:
Name
Type
requiredChanges
Returns: boolean

requireGuardAndTake

requireGuardAndTake(requiredChanges: RequiredViewChanges, force?: undefined | false | true): boolean
Parameters:
Name
Type
requiredChanges
force?
undefined | false | true
Returns: boolean

resolvePositionDependencies

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

screenshot(): string | undefined
Inherited from RootCanvasView.screenshot
Returns: string | undefined

setBackgroundColor

setBackgroundColor(backgroundColor: string | undefined): void
Parameters:
Name
Type
backgroundColor
string | undefined
Returns: void

setBorder

setBorder(borderRect: RectLike | undefined): void
Inherited from RootCanvasView.setBorder
Parameters:
Name
Type
borderRect
RectLike | undefined
Returns: void

setBorderColor

setBorderColor(borderColor: string | undefined): void
Inherited from RootCanvasView.setBorderColor
Parameters:
Name
Type
borderColor
string | undefined
Returns: void

setChildAt

setChildAt(child: View, position: number): void
Inherited from RootCanvasView.setChildAt
Parameters:
Name
Type
child
View
position
number
Returns: void

setId

setId(id?: undefined | string): void
Inherited from RootCanvasView.setId
Parameters:
Name
Type
id?
undefined | string
Returns: void

setLayoutParams

setLayoutParams(lp: LayoutParams): void
Parameters:
Name
Type
lp
Returns: void

setOnMount

setOnMount(callback: function): void
Inherited from RootCanvasView.setOnMount
Parameters:
callback: function
▸ (view: View‹any›): void
Parameters:
Name
Type
view
View‹any›
Returns: void

setScaleType

setScaleType(scaleType: ImageScaleType): void
Parameters:
Name
Type
scaleType
Returns: void

setSource

setSource(source: string): void
Parameters:
Name
Type
source
string
Returns: void

setVisibility

setVisibility(visibility: Visibility): void
Inherited from RootCanvasView.setVisibility
Parameters:
Name
Type
Default
visibility
Visibility.VISIBLE
Returns: void

snapshot

snapshot(): object
Inherited from RootCanvasView.snapshot
Returns: object
Export as PDF
Copy link
On this page
Hierarchy
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Properties
Protected Optional backgroundColor
Protected Optional borderColor
Protected Optional borderRect
Readonly context
Protected height
Optional id
Protected innerRect
Protected lp
Readonly name
offsetRect
Protected Optional onMount
Protected rect
Protected visibility
Protected width
Accessors
innerHeight
innerWidth
Methods
addChild
destroy
dispatchPointerEvent
draw
getBackgroundColor
getBorder
getBorderColor
getId
getInternalWrappedHeight
getInternalWrappedWidth
getLayoutParams
getMatchParentHeight
getMatchParentWidth
getOnMount
getParent
getRootView
getScaleType
getSource
getVisibility
hasParent
layout
measure
mount
onDestroy
onDraw
onLayout
onMeasure
onPointerEvent
onSizeChanged
onSnapshot
removeChild
removeChildAt
require
requireGuard
requireGuardAndTake
resolvePositionDependencies
screenshot
setBackgroundColor
setBorder
setBorderColor
setChildAt
setId
setLayoutParams
setOnMount
setScaleType
setSource
setVisibility
snapshot