ScreenLabelIconStyle

Description

sealed class Tinman.Engine.Drawing.ScreenLabelIconStyle

Derived from

ScreenLabelStyle

Defines visual style properties for IScreenLabelIcon instances.

To modify the orientation of the icon image content before rendering, use Orientation. To transform the icon when rendering it to the screen, use Rotation, Scale and Offset.

Public / Constructors

Screen​Label​Icon​Style


public constructor ScreenLabelIconStyle → ()

Creates a new instance of ScreenLabelIconStyle.

Public / Attributes

Color​Channels


public attribute ColorChannels → (get,set)

value : Vec4I

The color channel swizzle, where Vec4I.X, Vec4I.Y, Vec4I.Z and Vec4I.W correspond to red, green, blue and alpha, respectively.

Specifies the color channel swizzle to use when rendering the icon image.

Defaults to (0,1,2,3).

Color​Tint


public attribute ColorTint → (get,set)

value : int64

The modulation color.

The modulation color to apply (after color swizzle).

Defaults to Colors.White.

Offset


public attribute Offset → (get,set)

value : Vec2F

The transformation center, given as the pixel offset to add to the center of the oriented icon image. For example, an icon image with a size of 20 by 10 pixels and an orientation of Transform.Diagonal would have its center at (5|10).

Specifies the center of the render transformation (rotation and scaling).

The transformation center does not influence the label size that is computed by IScreenLabel.PrepareScreenLabel. Defaults to Vec2F.Zero.

Orientation


public attribute Orientation → (get,set)

value : Transform

The 2D transform that represents the orientation of the .

Sets the orientation of the icon image.

The orientation transform is applied to the icon image pixels (see IScreenLabelIcon.ContentIcon), which may flip the image dimensions but will otherwise not influence the positioning of the screen label, i.e. the behaviour is equivalent to using a pre-transformed icon image and then Transform.None.

None, Center, Vertical, Horizontal:
+------------+
|            |
|            |
+------------+
Rotate, RotateInv, Diagonal, DiagonalInv:
+------+
|      |
|      |
|      |
|      |
|      |
+------+

Defaults to Transform.None.

Rotation


public attribute Rotation → (get,set)

value : float32

The rotation angle, in degrees. Positive angles rotate clockwise.

Specifies the rotation angle to use for rendering the oriented icon image.

The rotation does not influence the label size that is computed by IScreenLabel.PrepareScreenLabel. Defaults to 0.

Scale


public attribute Scale → (get,set)

value : float32

[>0]
The scale factor.

Specifies the scale factor to use for rendering the oriented icon image.

The scaling does not influence the label size that is computed by IScreenLabel.PrepareScreenLabel. Defaults to 1.