ImageView

Description

sealed class Tinman.Engine.GUI.Components.ImageView

Derived from

Component abstract

Displays an image.

Public / Constants

Class


public static readonly attribute Class → (StyleClass)

The style class for ImageView.

Public / Constructors

Image​View


public constructor ImageView → (2)

imageHandle opt : IResourceHandle = null

Initial value of ImageHandle.

imageTint opt : bool = false

Initial value of ImageTint.

Creates a new instance of ImageView.

Public / Attributes

Image


[OwnerValue]
public attribute Image → (get,set)

value : Bitmap

The image resource.

The image resource.

Settings the image resource will reset the image resource handle to null (see ImageHandle).

See also

Bitmap

Image​Canvas​Offset


public attribute ImageCanvasOffset → (get)

value : Vec2I

The image canvas offset.

Returns the current offset of the image canvas.

Image​Canvas​Size


public attribute ImageCanvasSize → (get)

value : Vec2I

The image canvas size.

Returns the current size of the image canvas.

Image​Fit


public attribute ImageFit → (get,set)

value : int32

[0..2]
The image fit mode:
0 : adjust layout size with image size and center in resulting size
1 : scale image uniformly and center in layout size
2 : stretch image to layout size.

Specifies the mode to use for fitting the image into the layout size.

Defaults to 0.

Image​Fit​Aspect​Ratio


public attribute ImageFitAspectRatio → (get,set)

value : float64

[>=0]
The aspect ratio or 0 to disable.

When the image is stretched to the layout size (see ImageFit), this aspect ratio will be used to determine the height of the image canvas, based on the available horizontal space.

Defaults to 0.

Image​Handle


public attribute ImageHandle → (get,set)

value : IResourceHandle

The image resource handle.

The image resource handle.

See also

Bitmap

Image​Tint


public attribute ImageTint → (get,set)

value : bool

true to modulate the image with the tint color,
false to draw the original image.

Use the tint color to modulate the image?

Defaults to false

Image​Tint​Color


public attribute ImageTintColor → (get,set)

value : int64

The tint color to use. If 0, Style.ForegroundColor will be used instead.

The color to use for tinting the image.

Defaults to 0.