IOverlay#

class ansys.stk.core.graphics.IOverlay#

A visible element drawn in screen space. Overlays are useful for floating logos, heads up displays, and integrating user interfaces into the 3D window.

Overview#

bring_to_front

Brings the overlay to the front of the z-order, so it is on top of all other overlays with the same parent.

send_to_back

Send the overlay to the back of the z-order, so it is underneath all other overlays with the same parent.

overlay_to_control

Transform a given position, specified relative to the overlay, into coordinates relative to the overall globe control…

control_to_overlay

Transform a given position, specified relative to the overall globe control, into coordinates relative to this overlay…

position

Get or set the position of the overlay relative to its parent. The array represents the position of the overlay and has a size of 4. The elements are in the order x position, y position, x screen overlay unit, y screen overlay unit.

pinning_position

Get or set the pinning position of the overlay, relative to the overlay, which determines the point on the overlay that corresponds to the position property. The array represents the pinning position of the overlay and has a size of 4…

x

Get or set the X position of the overlay relative to its parent. The unit in which the position is defined is specified by the x unit property. The position is measured horizontally from the origin, which is, by default, the lower-left corner.

x_unit

Get or set the unit of the x property.

y

Get or set the Y position of the overlay relative to its parent. The unit in which the position is defined is specified by the y unit property. The position is measured vertically from the origin, which is, by default, the lower-left corner.

y_unit

Get or set the unit of the y property.

size

Get or set the size of the overlay. The array elements represent the size of the overlay in the order width, height, width screen overlay unit, height screen overlay unit.

width

Get or set the width of the overlay. The unit in which the width is defined is specified by the width unit property.

width_unit

Get or set the unit of the width property.

height

Get or set the height of the overlay. The unit in which the height is defined is specified by the height unit property.

height_unit

Get or set the unit of the height property.

minimum_size

Get or set the minimum size of the overlay. The overlay will never be smaller than this size, even if the overlay’s size is specified as a percentage of its parent and its parent is very small…

maximum_size

Get or set the maximum size of the overlay. The overlay will never be larger than this size, even if the overlay’s size is specified as a percentage of its parent and its parent is very large…

bounds

Get the bounds of the overlay relative to its parent. The array contains the properties defining the bounds in the order left x location, top y location, width, height.

border_color

Get or set the overlay’s border color. By default, the border color is white. However, also by default, the overlay has a border size of 0.0 so the border is not displayed.

border_size

Get or set the size of the overlay’s border. By default, this is 0.0 so the border is not displayed.

border_translucency

Get or set the translucency of the overlay border. Translucency is a value between 0.0 and 1.0, where 0.0 is completely opaque and 1.0 is completely transparent.

translation_x

Get or set the value with which the overlay will be translated from the X value of the position property.

translation_y

Get or set the value with which the overlay will be translated from the Y value of the position property.

rotation_angle

Get or set the counter-clockwise rotation of the overlay. The overlay is rotated around the point specified by the rotation point property.

rotation_point

Get or set the point that the overlay is rotated around when the rotation angle property has a value other than 0.0. The array contains seven elements defining the properties of the rotation point…

scale

Get or set the fractional value used to scale the overlay’s size property. A value greater than 1.0 will make the overlay larger while a value less than 1.0 will make it smaller.

flip_x

Get or set whether the overlay will be flipped along its X axis.

flip_y

Get or set whether the overlay will be flipped along its Y axis.

origin

Get or set the origin from which the overlay’s position is defined. By default, the value of this property is bottom left…

pinning_origin

Get or set the origin of the pinning position property, relative to the overlay…

parent

Get the overlay’s parent. This may be another overlay if this overlay was added to that overlay’s overlays collection. Or, it may be the screen overlay manager if this overlay was added to the scene manager’sscreen overlays collection.

translucency

Get or set the overlay’s translucency. Translucency is a value between 0.0 and 1.0, where 0.0 is completely opaque and 1.0 is completely transparent.

color

Get or set the overlay’s color. By default, the overlay is white.

picking_enabled

Get or set a value indicating whether or not picking on the overlay is enabled. If picking is disabled, this overlay will never show up in the result of PickScreenOverlay, even if it occupies the specified pick position.

clip_to_parent

Get or set a value indicating whether or not the overlay will be clipped by the bounds of its parent. If this property is <see langword=’false’ />, part of this overlay may be visible outside of its parent’s bounds.

display

Get or set if this overlay and the collection of overlays that are contained within this overlay should be rendered.

control_position

Get the position of the overlay in coordinates relative to the overall globe control. The array represents the position of the overlay and has a size of 4. The elements are in the order x position, y position, x screen overlay unit, y screen overlay unit.

control_size

Get the size of the overlay in coordinates relative to the overall globe control. The elements are in the order width, height, width screen overlay unit, height screen overlay unit.

control_bounds

Get the bounds of the overlay in coordinates relative to the overall globe control. The array contains the properties defining the bounds in the order left x location, top y location, width, height.

display_condition

Get or set the display condition that determines if the overlay should be rendered. Both this and display must evaluate to true for the overlay to be rendered.

overlays

Get the collection of overlays that are contained within this overlay.

padding

Get or set the padding surrounding the overlays that are contained within this overlay. The array contains the components of the padding arranged in the order left, top, right, bottom.

tag

Get or set custom value associated with this primitive.

Import detail#

from ansys.stk.core.graphics import IOverlay

Property detail#

property IOverlay.position: list#

Get or set the position of the overlay relative to its parent. The array represents the position of the overlay and has a size of 4. The elements are in the order x position, y position, x screen overlay unit, y screen overlay unit.

property IOverlay.pinning_position: list#

Get or set the pinning position of the overlay, relative to the overlay, which determines the point on the overlay that corresponds to the position property. The array represents the pinning position of the overlay and has a size of 4…

property IOverlay.x: float#

Get or set the X position of the overlay relative to its parent. The unit in which the position is defined is specified by the x unit property. The position is measured horizontally from the origin, which is, by default, the lower-left corner.

property IOverlay.x_unit: ScreenOverlayUnit#

Get or set the unit of the x property.

property IOverlay.y: float#

Get or set the Y position of the overlay relative to its parent. The unit in which the position is defined is specified by the y unit property. The position is measured vertically from the origin, which is, by default, the lower-left corner.

property IOverlay.y_unit: ScreenOverlayUnit#

Get or set the unit of the y property.

property IOverlay.size: list#

Get or set the size of the overlay. The array elements represent the size of the overlay in the order width, height, width screen overlay unit, height screen overlay unit.

property IOverlay.width: float#

Get or set the width of the overlay. The unit in which the width is defined is specified by the width unit property.

property IOverlay.width_unit: ScreenOverlayUnit#

Get or set the unit of the width property.

property IOverlay.height: float#

Get or set the height of the overlay. The unit in which the height is defined is specified by the height unit property.

property IOverlay.height_unit: ScreenOverlayUnit#

Get or set the unit of the height property.

property IOverlay.minimum_size: list#

Get or set the minimum size of the overlay. The overlay will never be smaller than this size, even if the overlay’s size is specified as a percentage of its parent and its parent is very small…

property IOverlay.maximum_size: list#

Get or set the maximum size of the overlay. The overlay will never be larger than this size, even if the overlay’s size is specified as a percentage of its parent and its parent is very large…

property IOverlay.bounds: list#

Get the bounds of the overlay relative to its parent. The array contains the properties defining the bounds in the order left x location, top y location, width, height.

property IOverlay.border_color: Color#

Get or set the overlay’s border color. By default, the border color is white. However, also by default, the overlay has a border size of 0.0 so the border is not displayed.

property IOverlay.border_size: int#

Get or set the size of the overlay’s border. By default, this is 0.0 so the border is not displayed.

property IOverlay.border_translucency: float#

Get or set the translucency of the overlay border. Translucency is a value between 0.0 and 1.0, where 0.0 is completely opaque and 1.0 is completely transparent.

property IOverlay.translation_x: float#

Get or set the value with which the overlay will be translated from the X value of the position property.

property IOverlay.translation_y: float#

Get or set the value with which the overlay will be translated from the Y value of the position property.

property IOverlay.rotation_angle: float#

Get or set the counter-clockwise rotation of the overlay. The overlay is rotated around the point specified by the rotation point property.

property IOverlay.rotation_point: list#

Get or set the point that the overlay is rotated around when the rotation angle property has a value other than 0.0. The array contains seven elements defining the properties of the rotation point…

property IOverlay.scale: float#

Get or set the fractional value used to scale the overlay’s size property. A value greater than 1.0 will make the overlay larger while a value less than 1.0 will make it smaller.

property IOverlay.flip_x: bool#

Get or set whether the overlay will be flipped along its X axis.

property IOverlay.flip_y: bool#

Get or set whether the overlay will be flipped along its Y axis.

property IOverlay.origin: ScreenOverlayOrigin#

Get or set the origin from which the overlay’s position is defined. By default, the value of this property is bottom left…

property IOverlay.pinning_origin: ScreenOverlayPinningOrigin#

Get or set the origin of the pinning position property, relative to the overlay…

property IOverlay.parent: IScreenOverlayContainer#

Get the overlay’s parent. This may be another overlay if this overlay was added to that overlay’s overlays collection. Or, it may be the screen overlay manager if this overlay was added to the scene manager’sscreen overlays collection.

property IOverlay.translucency: float#

Get or set the overlay’s translucency. Translucency is a value between 0.0 and 1.0, where 0.0 is completely opaque and 1.0 is completely transparent.

property IOverlay.color: Color#

Get or set the overlay’s color. By default, the overlay is white.

property IOverlay.picking_enabled: bool#

Get or set a value indicating whether or not picking on the overlay is enabled. If picking is disabled, this overlay will never show up in the result of PickScreenOverlay, even if it occupies the specified pick position.

property IOverlay.clip_to_parent: bool#

Get or set a value indicating whether or not the overlay will be clipped by the bounds of its parent. If this property is <see langword=’false’ />, part of this overlay may be visible outside of its parent’s bounds.

property IOverlay.display: bool#

Get or set if this overlay and the collection of overlays that are contained within this overlay should be rendered.

property IOverlay.control_position: list#

Get the position of the overlay in coordinates relative to the overall globe control. The array represents the position of the overlay and has a size of 4. The elements are in the order x position, y position, x screen overlay unit, y screen overlay unit.

property IOverlay.control_size: list#

Get the size of the overlay in coordinates relative to the overall globe control. The elements are in the order width, height, width screen overlay unit, height screen overlay unit.

property IOverlay.control_bounds: list#

Get the bounds of the overlay in coordinates relative to the overall globe control. The array contains the properties defining the bounds in the order left x location, top y location, width, height.

property IOverlay.display_condition: IDisplayCondition#

Get or set the display condition that determines if the overlay should be rendered. Both this and display must evaluate to true for the overlay to be rendered.

property IOverlay.overlays: ScreenOverlayCollection#

Get the collection of overlays that are contained within this overlay.

property IOverlay.padding: list#

Get or set the padding surrounding the overlays that are contained within this overlay. The array contains the components of the padding arranged in the order left, top, right, bottom.

property IOverlay.tag: Any#

Get or set custom value associated with this primitive.

Method detail#

IOverlay.bring_to_front(self) None#

Brings the overlay to the front of the z-order, so it is on top of all other overlays with the same parent.

Returns:

None

IOverlay.send_to_back(self) None#

Send the overlay to the back of the z-order, so it is underneath all other overlays with the same parent.

Returns:

None

IOverlay.overlay_to_control(self, x: float, y: float) list#

Transform a given position, specified relative to the overlay, into coordinates relative to the overall globe control…

Parameters:

x : float

y : float

Returns:

list

IOverlay.control_to_overlay(self, x: float, y: float) list#

Transform a given position, specified relative to the overall globe control, into coordinates relative to this overlay…

Parameters:

x : float

y : float

Returns:

list