ScriptUIExtendScript only
Object

ScriptUIGraphics

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

Properties

NameType AccessDescription
static Object readonly Contains the enumerated constants for the type argument of newBrush().
static Object readonly Contains the enumerated constants for the type argument of newPen().
ScriptUIBrush read/write The background color for containers; for non-containers, the parent background color.
ScriptUIPath readonly The current drawing path, encapsulated in a path object.
Point readonly The current position in the current drawing path.
ScriptUIBrush read/write The background color for containers when disabled or inactive; for non-containers, the parent background color.
ScriptUIPen read/write The text color when the element is disabled or inactive.
ScriptUIFont read/write The default font to use for displaying text.
ScriptUIPen read/write The text color.

Methods

void

Closes the current path.

void

Draws a focus ring within a region of this element.

left Number The left coordinate of the region.
top Number The top coordinate of the region.
width Number The width of the region in pixels.
height Number The height of the region in pixels.
void

Draws an image within a given region of the element.

image ScriptUIImage The image to draw.
left Number The left coordinate of the region, relative to the origin of this element.
top Number The top coordinate of the region, relative to the origin of this element.
width? Number The width in pixels. If provided, the image is stretched or shrunk to fit. If omitted, uses the original image width.
height? Number The height in pixels. If provided, the image is stretched or shrunk to fit. If omitted, uses the original image height.
void

Draw the platform-specific control associated with this element.

void

Draw a string of text starting at a given point in this element, using a given drawing pen and font.

text String The text string.
pen ScriptUIPen The drawing pen to use.
x Number The left coordinate, relative to the origin of this element.
y Number The top coordinate, relative to the origin of this element.
font? ScriptUIFont The font to use. Default is the font value in this object.
Point

Defines an elliptical path within a given rectangular area in the currentPath object, which can be filled using fillPath() or stroked using strokePath().

left Number The left coordinate of the region, relative to the origin of this element.
top Number The top coordinate of the region, relative to the origin of this element.
width Number The width of the region in pixels.
height Number The height of the region in pixels.
void

Fills a path using a given painting brush.

brush ScriptUIBrush The brush object that defines the fill color.
path? ScriptUIPath The path object. Default is the currentPath.
Point

Adds a path segment to the currentPath.

x Number The X coordinate for the destination point, relative to the origin of this element.
y Number The Y coordinate for the destination point, relative to the origin of this element.
Dimension

Calculates the size needed to display a string using the given font.

text String The text string to measure.
font? ScriptUIFont The font to use. Default is the font value in this object.
boundingWidth? Number The bounding width.
Point

Adds a given point to the currentPath, and makes it the current drawing position.

x Number The X coordinate for the new point, relative to the origin of this element.
y Number The Y coordinate for the new point, relative to the origin of this element.
ScriptUIBrush

Creates a new painting brush object.

type Number The brush type, solid or theme.
color Number[] | String[] The brush color.
ScriptUIPath

Creates a new, empty path object.

ScriptUIPen

Creates a new drawing pen object.

type Number The pen type, solid or theme.
color Number[] | String[] The pen color.
width Number The width of the pen line in pixels.
Point

Defines a rectangular path in the currentPath object.

left Number The left coordinate relative to the origin of this element.
top Number The top coordinate relative to the origin of this element.
width Number The width in pixels.
height Number The height in pixels.
void

Strokes the path segments of a path with a given drawing pen.

pen ScriptUIPen The drawing pen that defines the color and line width.
path? ScriptUIPath The path object. Default is the currentPath.

Object of 15

Properties elsewhere that hold a ScriptUIGraphics.