ScriptUIGraphics

Description

An object used to draw custom graphics, found in the graphics property of window, container, and control objects.

Allows a script to customize aspects of the element?s appearance, such as the color and font. Use an onDraw callback function to set these properties or call the functions.All measurements are in pixels.

Properties

backgroundColor readonly The background color for containers; for non-containers, the parent background color.
currentPath readonly The current drawing path, encapsulated in a path object.
currentPoint readonly The current position in the current drawing path.
disabledBackgroundColor readonly The background color for containers when disabled or inactive; for non-containers, the parent background color.
disabledForegroundColor readonly The text color when the element is disabled or inactive.
font readonly The default font to use for displaying text.
foregroundColor readonly The text color.

Static Properties

BrushType readonly Contains the enumerated constants for the type argument of?newBrush().
PenType readonly Contains the enumerated constants for the type argument of?newPen().

Methods

closePath readonly Closes the current path.
drawFocusRing readonly Draws a focus ring within a region of this element.
drawImage readonly Draws an image within a given region of the element.
drawOSControl readonly Draw the platform-specific control associated with this element.
drawString readonly Draw a string of text starting at a given point in this element, using a given drawing pen and font.
ellipsePath readonly Defines an elliptical path within a given rectangular area in the?currentPath?object, which can be filled using?fillPath()?or stroked using?strokePath().
fillPath readonly Fills a path using a given painting brush.
lineTo readonly Adds a path segment to the?currentPath.
measureString readonly Calculates the size needed to display a string using the given font.
moveTo readonly Adds a given point to the?currentPath, and makes it the current drawing position.
newBrush readonly Creates a new painting brush object.
newPath readonly Creates a new, empty path object.
newPen readonly Creates a new drawing pen object.
rectPath readonly Defines a rectangular path in the?currentPath?object.
strokePath readonly Strokes the path segments of a path with a given drawing pen.