BitmapWidget

open class BitmapWidget @JvmOverloads constructor(bitmap: Bitmap, originalPosition: WidgetPosition) : Widget

Widget displaying bitmap within specified position and margins.

Parameters

bitmap

bitmap used to draw widget

originalPosition

position of widget

Constructors

BitmapWidget
Link copied to clipboard
fun BitmapWidget(bitmap: Bitmap, position: WidgetPosition = WidgetPosition( vertical = WidgetPosition.Vertical.TOP, horizontal = WidgetPosition.Horizontal.LEFT, ), marginX: Float = 0f, marginY: Float = 0f)

The deprecated constructor for BitmapWidget.

BitmapWidget
Link copied to clipboard
fun BitmapWidget(bitmap: Bitmap, position: WidgetPosition = WidgetPosition( vertical = WidgetPosition.Vertical.TOP, horizontal = WidgetPosition.Horizontal.LEFT, ), marginX: Float = 0f)

The deprecated constructor for BitmapWidget.

BitmapWidget
Link copied to clipboard
fun BitmapWidget(bitmap: Bitmap, originalPosition: WidgetPosition = WidgetPosition { verticalAlignment = WidgetPosition.Vertical.TOP horizontalAlignment = WidgetPosition.Horizontal.LEFT offsetX = 0f offsetY = 0f })

Functions

getPosition
Link copied to clipboard
open override fun getPosition(): WidgetPosition

Get the current position of the widget.

getRotation
Link copied to clipboard
open override fun getRotation(): Float

Get absolute rotation of widget in degrees.

setPosition
Link copied to clipboard
open override fun setPosition(widgetPosition: WidgetPosition)

Update the widget to the new position.

setRotation
Link copied to clipboard
open override fun setRotation(angleDegrees: Float)

Set the absolute rotation of widget in degrees.

setTranslation
Link copied to clipboard
open override fun setTranslation(translationX: Float, translationY: Float)

Set the translation of the widget in pixels, relative to it's original position.

updateBitmap
Link copied to clipboard
fun updateBitmap(bitmap: Bitmap)

Update bitmap widget uses.

Inheritors

CompassWidget
Link copied to clipboard
LogoWidget
Link copied to clipboard