Skip To Content ArcGIS for Developers Sign In Dashboard

KmlScreenOverlay Class

class Esri::ArcGISRuntime::KmlScreenOverlay

An image overlay fixed to the screen. More...

Header: #include <KmlScreenOverlay>
Since: Esri::ArcGISRuntime 100.4
Inherits: Esri::ArcGISRuntime::KmlNode

This class was introduced in Esri::ArcGISRuntime 100.4.

Public Functions

KmlScreenOverlay(Esri::ArcGISRuntime::KmlIcon *icon, QObject *parent = nullptr)
virtual ~KmlScreenOverlay() override
QColor color() const
int drawOrder() const
Esri::ArcGISRuntime::KmlIcon *icon() const
Esri::ArcGISRuntime::KmlImageCoordinate *overlayCoordinate() const
double rotation() const
Esri::ArcGISRuntime::KmlImageCoordinate *rotationCoordinate() const
Esri::ArcGISRuntime::KmlImageCoordinate *screenCoordinate() const
void setColor(const QColor &color)
void setDrawOrder(int drawOrder)
void setIcon(Esri::ArcGISRuntime::KmlIcon *icon)
void setOverlayCoordinate(Esri::ArcGISRuntime::KmlImageCoordinate *overlayCoordinate)
void setRotation(double rotation)
void setRotationCoordinate(Esri::ArcGISRuntime::KmlImageCoordinate *rotationCoordinate)
void setScreenCoordinate(Esri::ArcGISRuntime::KmlImageCoordinate *screenCoordinate)
void setSize(Esri::ArcGISRuntime::KmlImageCoordinate *size)
Esri::ArcGISRuntime::KmlImageCoordinate *size() const

Detailed Description

ScreenOverlays can be used for compasses, logos, and heads-up displays.

Member Function Documentation

KmlScreenOverlay::KmlScreenOverlay(Esri::ArcGISRuntime::KmlIcon *icon, QObject *parent = nullptr)

Creates a screen overlay with the specified icon.

  • icon - The icon associated to the screen overlay.
  • parent - an optional parent QObject.

This function was introduced in Esri::ArcGISRuntime 100.7.

[override virtual] KmlScreenOverlay::~KmlScreenOverlay()

Destructor.

QColor KmlScreenOverlay::color() const

Returns the color mask to be applied to the KML screen overlay's image buffer.

A color mask can be used to blend the image associated with KML screen overlay. Pixels in the overlay image are multiplied by this color channel-by-channel.

See also setColor().

int KmlScreenOverlay::drawOrder() const

Returns the KML screen overlay's draw order.

See also setDrawOrder().

Esri::ArcGISRuntime::KmlIcon *KmlScreenOverlay::icon() const

Returns the Kml screen overlay icon.

This function was introduced in Esri::ArcGISRuntime 100.7.

See also setIcon().

Esri::ArcGISRuntime::KmlImageCoordinate *KmlScreenOverlay::overlayCoordinate() const

Returns a point on (or outside of) the overlay image that is mapped to the screen coordinate (screenCoordinate).

It requires x and y values, and the units for those values. The x and y values can be specified in three different ways: as pixels ("pixels"), as fractions of the image ("fraction"), or as inset pixels ("insetPixels"), which is an offset in pixels from the upper right corner of the image. The x and y positions can be specified in different ways - for example, x can be in pixels and y can be a fraction. The origin of the coordinate system is in the lower left corner of the image. If not specified, the default is the center of the overlay image.

This function was introduced in Esri::ArcGISRuntime 100.7.

See also setOverlayCoordinate() and screenCoordinate.

double KmlScreenOverlay::rotation() const

Returns the angle of rotation of the parent object.

A value of 0 means no rotation. The value is an angle in degrees counterclockwise starting from north. The center of the rotation, if not specified in rotation coordinate (rotationCoordinate), is the center of the overlay image.

This function was introduced in Esri::ArcGISRuntime 100.7.

See also setRotation().

Esri::ArcGISRuntime::KmlImageCoordinate *KmlScreenOverlay::rotationCoordinate() const

Returns a point relative to the screen about which the screen overlay is rotated.

If not specified, the rotation point is the center of the screen.

This function was introduced in Esri::ArcGISRuntime 100.7.

See also setRotationCoordinate().

Esri::ArcGISRuntime::KmlImageCoordinate *KmlScreenOverlay::screenCoordinate() const

Returns a point relative to the screen origin that the overlay image is mapped to.

The x and y values can be specified in three different ways: as pixels ("pixels"), as fractions of the screen ("fraction"), or as inset pixels ("insetPixels"), which is an offset in pixels from the upper right corner of the screen. The x and y positions can be specified in different ways—for example, x can be in pixels and y can be a fraction. The origin of the coordinate system is in the lower left corner of the screen. If not specified, the default is the center of the screen.

This function was introduced in Esri::ArcGISRuntime 100.7.

See also setScreenCoordinate() and overlayCoordinate.

void KmlScreenOverlay::setColor(const QColor &color)

Sets the color to color

This function was introduced in Esri::ArcGISRuntime 100.7.

See also color.

void KmlScreenOverlay::setDrawOrder(int drawOrder)

Sets the draw order to drawOrder.

This function was introduced in Esri::ArcGISRuntime 100.7.

See also drawOrder.

void KmlScreenOverlay::setIcon(Esri::ArcGISRuntime::KmlIcon *icon)

Sets the icon to icon.

This function was introduced in Esri::ArcGISRuntime 100.7.

See also icon.

void KmlScreenOverlay::setOverlayCoordinate(Esri::ArcGISRuntime::KmlImageCoordinate *overlayCoordinate)

Sets the overlay coordinate to overlayCoordinate.

This function was introduced in Esri::ArcGISRuntime 100.7.

See also overlayCoordinate.

void KmlScreenOverlay::setRotation(double rotation)

Sets the rotation to rotation.

This function was introduced in Esri::ArcGISRuntime 100.7.

See also rotation.

void KmlScreenOverlay::setRotationCoordinate(Esri::ArcGISRuntime::KmlImageCoordinate *rotationCoordinate)

Sets the rotation coordinate to rotationCoordinate.

This is the screen location about which the screen overlay is rotated.

This function was introduced in Esri::ArcGISRuntime 100.7.

See also rotationCoordinate.

void KmlScreenOverlay::setScreenCoordinate(Esri::ArcGISRuntime::KmlImageCoordinate *screenCoordinate)

Sets the screen coordinate to screenCoordinate.

This function was introduced in Esri::ArcGISRuntime 100.7.

See also screenCoordinate.

void KmlScreenOverlay::setSize(Esri::ArcGISRuntime::KmlImageCoordinate *size)

Sets the size to size.

This function was introduced in Esri::ArcGISRuntime 100.7.

See also size.

Esri::ArcGISRuntime::KmlImageCoordinate *KmlScreenOverlay::size() const

Returns the size of the image for the screen overlay.

  • A value of -1 indicates to use the native dimension.
  • A value of 0 indicates to maintain the aspect ratio.
  • A value of n sets the value of the dimension.

Examples:

  • A x value of -1 and y value of -1 in fractions indicates the image size equals its original x and y dimensions.
  • A x value of -1 and y value of 0.2 in fractions indicates the image size equals its original x dimension and 20% of its y dimension.
  • A x value of 100 and y value of 500 in pixels indicates the image is of size 100 pixels by 500 pixels.

If not specified, the default is the original size of the image.

This function was introduced in Esri::ArcGISRuntime 100.7.

See also setSize().


Feedback on this topic?