TextOverlayFactory#

class ansys.stk.core.graphics.TextOverlayFactory#

A rectangular overlay that contains text.

Overview#

initialize

Initialize the overlay with a position of (0, 0), a width of 100 pixels, and a height of 50 pixels.

initialize_with_xy_width_height

Initialize the overlay with the specified x position, y position, width, and height, all specified in pixels.

initialize_with_position_size

Initialize the overlay with the specified position and size.

initialize_with_width_height_units

Initialize the overlay with the specified position and size.

Import detail#

from ansys.stk.core.graphics import TextOverlayFactory

Method detail#

TextOverlayFactory.initialize(self, font: GraphicsFont) TextOverlay#

Initialize the overlay with a position of (0, 0), a width of 100 pixels, and a height of 50 pixels.

Parameters:

font : GraphicsFont

Returns:

TextOverlay

TextOverlayFactory.initialize_with_xy_width_height(self, font: GraphicsFont, x_pixels: float, y_pixels: float, width_pixels: float, height_pixels: float) TextOverlay#

Initialize the overlay with the specified x position, y position, width, and height, all specified in pixels.

Parameters:

font : GraphicsFont

x_pixels : float

y_pixels : float

width_pixels : float

height_pixels : float

Returns:

TextOverlay

TextOverlayFactory.initialize_with_position_size(self, font: GraphicsFont, position: list, size: list) TextOverlay#

Initialize the overlay with the specified position and size.

Parameters:

font : GraphicsFont

position : list

size : list

Returns:

TextOverlay

TextOverlayFactory.initialize_with_width_height_units(self, font: GraphicsFont, width: float, width_unit: ScreenOverlayUnit, height: float, height_unit: ScreenOverlayUnit) TextOverlay#

Initialize the overlay with the specified position and size.

Parameters:

font : GraphicsFont

width : float

width_unit : ScreenOverlayUnit

height : float

height_unit : ScreenOverlayUnit

Returns:

TextOverlay