Class: ScreenImage

ScreenImage(screenOffset, imageSource)

Displays an image at a specified screen location in the WorldWindow. The image location is specified by an offset, which causes the image to maintain its relative position when the window size changes.

Constructor

new ScreenImage(screenOffset, imageSource)

Constructs a screen image.
Parameters:
Name Type Description
screenOffset Offset The offset indicating the image's placement on the screen. Use the image offset property to position the image relative to the specified screen offset.
imageSource String | ImageSource The source of the image to display. May be either a string identifying the URL of the image, or an ImageSource object identifying a dynamically created image.
Source:
Throws:
If the specified screen offset or image source is null or undefined.
Type
ArgumentError

Extends

Members

displayName :String

The display name of the renderable.
Type:
  • String
Inherited From:
Default Value:
  • "Renderable"
Source:

enabled :Boolean

Indicates whether to draw this screen image.
Type:
  • Boolean
Overrides:
Default Value:
  • true
Source:

imageColor :Color

The image color. When displayed, this shape's image is multiplied by this image color to achieve the final image color. The color white, the default, causes the image to be drawn in its native colors.
Type:
Default Value:
  • White (1, 1, 1, 1)
Source:

imageOffset :Offset

Indicates the location within the image at which to align with the specified screen location. May be null, in which case the image's bottom-left corner is placed at the screen location.
Type:
Default Value:
  • 0.5, 0.5, both fractional (Centers the image on the screen location.)
Source:

imageRotation :Number

The amount of rotation to apply to the image, measured in degrees clockwise from the top of the window.
Type:
  • Number
Default Value:
  • 0
Source:

imageScale :Number

Indicates the amount to scale the image.
Type:
  • Number
Default Value:
  • 1
Source:

imageSource :String|ImageSource

The source of the image to display. May be either a string identifying the URL of the image, or an ImageSource object identifying a dynamically created image.
Type:
Default Value:
  • null
Source:

imageTilt :Number

The amount of tilt to apply to the image, measured in degrees.
Type:
  • Number
Default Value:
  • 0
Source:

opacity :Number

This image's opacity. When this screen image is drawn, the actual opacity is the product of this opacity and the opacity of the layer containing this screen image.
Type:
  • Number
Source:

pickDelegate :Object

Indicates the object to return as the userObject of this shape when picked. If null, then this shape is returned as the userObject.
Type:
  • Object
Overrides:
Default Value:
  • null
Source:
See:

screenOffset :Offset

The offset indicating this screen image's placement on the screen.
Type:
Source:

userProperties :Object

An application defined object associated with this renderable. A typical use case is to associate application defined data with a picked renderable.
Type:
  • Object
Inherited From:
Default Value:
  • An empty object
Source:

Methods

render(dc)

Renders this screen image. This method is typically not called by applications but is called by RenderableLayer during rendering. For this shape this method creates and enques an ordered renderable with the draw context and does not actually draw the image.
Parameters:
Name Type Description
dc DrawContext The current draw context.
Overrides:
Source:

renderOrdered(dc)

Draws this shape as an ordered renderable. Applications do not call this function. It is called by WorldWindow during rendering.
Parameters:
Name Type Description
dc DrawContext The current draw context.
Source: