graphic

Typeobject
DictionaryLCS
LibraryLiveCode Script
Syntax
graphic
Synonymsgrc
Summary

A control that is a resizeable geometric shape.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
set the backgroundPattern of graphic "High Energy" to 3012
move graphic "Arrow" to 45,104 in 3 seconds
RelatedKeyword: control
Property: startAngle, angle, editMode, points, arcAngle, properties, polySides
Object: image
Glossary: property, object type
Description

Use the graphic object type to create a geometric shape, a straight or broken line, an arrow, or other shape.

Graphics can be circles, ovals, arcs, squares, rectangles, regular polygons with any number of sides, irregular polygons (closed or open), lines (jagged or straight), or curves (smooth or broken). You specify a graphic's basic shape by setting its style property, and details of different basic shapes with the points, arcAngle, startAngle, angle, and polySides properties. Unlike an image, a graphic can be resized without losing detail or becoming "jagged".

A graphic is contained in a card, group, or background. Graphics cannot contain other objects.

TypeNameSummarySyntax
messagedeleteGraphic

Sent to a graphic just before it is removed from the stack.

deleteGraphic

- - -dragDrop

Sent to the object where data was dropped when a drag and drop finishes.

dragDrop

- - -dragEnd

Sent to the object a drag and drop started from, when the data is dropped.

dragEnd

- - -dragEnter

Sent when the mouse pointer moves into an object during a drag and drop.

dragEnter

- - -dragLeave

Sent when the mouse pointer moves out of an object during a drag and drop.

dragLeave

- - -dragMove

Sent when the user moves the mouse during a drag and drop.

dragMove

- - -dragStart

Sent to a control when the user clicked on it and then started to drag the mouse pointer.

dragStart

- - -mouseDoubleDown

Sent when the user double-clicks.

mouseDoubleDown <pButtonNumber>

- - -mouseDoubleUp

Sent when the mouse button is released at the end of a double-click.

mouseDoubleUp <pButtonNumber>

- - -mouseDown

Sent when the user presses the mouse button.

mouseDown <pButtonNumber>

- - -mouseEnter

Sent when the mouse pointer moves into an object.

mouseEnter

- - -mouseLeave

Sent when the mouse pointer moves out of an object.

mouseLeave

- - -mouseMove

Sent when the user moves the mouse.

mouseMove <pNewMouseH>, <pNewMouseV>

- - -mouseRelease

Sent when the user releases the mouse outside the control that was clicked.

mouseRelease <pButtonNumber>

- - -mouseStillDown

Sent periodically while the mouse button is being held down.

mouseStillDown <pButtonNumber>

- - -mouseUp

Sent when the user releases the mouse button.

mouseUp <pButtonNumber>

- - -mouseWithin

Sent periodically to an object while the mouse pointer is within its borders.

mouseWithin

- - -nameChanged

Sent to an object when its name is changed.

nameChanged <pOldName>, <pNewName>

- - -newGraphic

Sent to a new graphic right after it's created.

newGraphic

- - -resizeControl

Sent to a control right after the user resizes it.

resizeControl

- - -selectedObjectChanged

Sent to an object when it is selected.

selectedObjectChanged

- - -socketClosed

Sent when the remote system closes a socket.

socketClosed <pSocketID>

- - -socketError

Sent when an error occurs on a socket that causes the socket to close or to fail to open.

socketError <pSocketID>, <pErrorString>

- - -socketTimeout

Sent when an open socket, read from socket or write to socket command halts for the time specified by the socketTimeoutInterval property.

socketTimeout <pSocketID>

propertyaltID

Specifies an alternate ID for objects.

set the altID of <object> to <IDNumber>

- - -angle

Specifies the starting angle of an arc or the rotation angle of a regular polygon or image.

set the angle of {<graphic> | <image>} to <angleInDegrees>

- - -antialiased

Specifies whether the edges of the graphic object should be smoothed or not.

set the antialiased of <graphic> to { true | false }

- - -arcAngle

Specifies the angle used to draw an arc.

set the arcAngle [of <graphic>] to <angleInDegrees>

- - -arrowSize

Specifies the size of an an arrow at one end of a line or polygon graphic.

set the arrowSize of <graphic> to <size>

- - -backgroundColor

Specifies an object's background color.

set the backgroundColor of <object> to {empty | <colorName> | <RGBColor>}

set the backgroundColor [of <chunk>] [of <line>] of <field> to {empty| <colorName> | <RGBColor>}

- - -backgroundPattern

The backgroundPattern specifies the pattern used to draw an object's background.

set the backgroundPattern of <object> to {<patternNumber> | <imageID> | empty}

- - -backgroundPixel

Specifies which entry in the color table is used for an object's background color.

set the backgroundPixel of <object> to <colorNumber>

- - -behavior

Allows an object to inherit its script handlers from another object.

set the behavior of <object> to {<button> | <stack>}

- - -borderColor

Specifies the color of an object's border.

set the borderColor of <object> to {empty | <colorName> | <RGBColor>}

set the borderColor of <line> of <field> to {empty | <colorName> | <RGBColor>}

- - -borderPattern

Specifies the pattern of an object's border.

set the borderPattern of <object> to {empty | <patternNumber> | <imageID>}

- - -borderPixel

Specifies which entry in the color table is used for the color of an object's border.

set the borderPixel of <object> to <colorNumber>

- - -bottom

Specifies how far an object's bottom edge is from the top of the window or screen.

set the bottom of <object> to <number>

- - -bottomColor

Specifies the color of a three-D object's lowered edge.

set the bottomColor of <object> to {empty | <colorName> | <RGBColor>}

- - -bottomLeft

Specifies the location of the specified object's lower left corner.

set the bottomLeft of <object> to <left>, <bottom>

- - -bottomPattern

Specifies the pattern of a three-D object's lowered edge.

set the bottomPattern of <object> to {empty | <patternNumber> | <imageID>}

- - -bottomPixel

Specifies which entry in the color table is used for the color of a three-D object's lowered edge.

set the bottomPixel of <object> to <colorNumber>

- - -bottomRight

Specifies the location of the specified object's lower right corner.

set the bottomRight of <object> to right,bottom

- - -capStyle

Specifies how the ends of lines and dashes are drawn.

set the capStyle [of graphic] to <style>

- - -colorOverlay

Specifies the color overlay to use for an object.

set the colorOverlay of object to <propertiesArray>

set the colorOverlay[<propertyName>] of object to <propertyValue>

- - -colors

Specifies all the colors of an object, in shorthand form.

set the colors of <object> to <colorsList>

- - -container

This property defines how the layout of a control behaves with respect to its owner.

set the container[propertyName] of object to propertyValue

get the container[propertyName] of object

- - -container expanded

Expands the control so that it fills the available space.

set the container["type"] of object to "expanded"

- - -container flexible

Expands the control so that it fills the available space.

set the container["type"] of object to "expanded"

- - -cursorHover

Specifies the mouse cursor to be displayed when pointing over a control.

get the cursorHover of object

set the cursorHover of object to {cursorName | imageID}

- - -customKeys

Lists the names of all the custom properties of an object.

set the customKeys of <object> to {<propertiesList> | empty}

- - -customProperties

Specifies all the custom properties of an object that are in the current customPropertySet, along with their settings.

set the customProperties of <object> to <propertiesArray>

set the customProperties[<propertySet>] of <object> to <propertiesArray>

- - -customPropertySet

Specifies a set of custom properties applied to an object.

set the customPropertySet of object to {setName | empty}

- - -customPropertySets

Lists all the custom property sets that can apply to an object.

get the customPropertySets of <object>

- - -dashes

Specifies the appearance of dashed lines in graphics and paint images.

set the dashes [of <graphic>] to <pixelsOn> [, <pixelsOff>]

- - -disabled

Specifies that an object is dimmed and does not respond to user action.

set the disabled of <object> to {true | false}

- - -dontResize

Specifies whether an irregular polygon graphic is resized when its vertexes are changed.

set the dontResize of <graphic> to {true | false}

- - -dropShadow

Specifies the drop shadow to use for an object.

set the dropShadow of object to <propertiesArray>

set the dropShadow[<propertyName>] of object to <propertyValue>

- - -editMode

Determines what editing handles should be made available on the graphic object.

set the editMode of <graphic> to {polygon | strokegradient | fillgradient}

- - -enabled

Specifies that an object is active and responds to user action.

set the enabled of <object> to {true | false}

- - -encoding

Returns the encoding of the specified piece of text.

the encoding of { button | graphic | group }

the encoding of [<chunk> of] <field>

- - -endArrow

Specifies whether the last vertex in a polygon graphic has an arrowhead.

set the endArrow of <graphic> to {true | false}

- - -filled

Specifies whether graphics and shapes drawn with the paint tools are filled or hollow.

set the filled [of <graphic>] to {true | false}

- - -fillGradient

Specifies the gradient to use to fill the graphic object.

set the fillGradient [of graphic] to <propertiesArray>

- - -fillRule

Specifies the rule used to determine whether a point lies inside or outside the graphic.

set the fillRule [of graphic] to {evenodd | nonzero | none}

- - -flex

The flex factor to use for the control.

get the flex of object

set the flex of object to {<integer>}

- - -focusColor

Specifies the color of the outline around the active control or the field with the insertion point.

set the focusColor of <object> to {empty | <colorName> | <RGBColor>}

- - -focusPattern

Specifies the pattern used for an object's outline when it has the insertion point or is active focused.

set the focusPattern of <object> to {<patternNumber> | <imageID> | empty}

- - -focusPixel

Specifies which entry in the color table is used for the color of an object's outline when it has the insertion point or is active focused.

set the focusPixel of <object> to <colorNumber>

- - -foregroundColor

Specifies the color of object text and borders.

set the foregroundColor of <object> to {empty | <colorName> | <RGBColor>}

set the foregroundColor of [<chunk> of] <field> to {empty| <colorName> | <RGBColor>}

- - -foregroundPattern

Specifies the pattern used for object text and borders.

set the foregroundPattern of <object> to {<patternNumber> | <imageID> | empty}

set the foregroundPattern of [<chunk> of] <field> to {<patternNumber> | <imageID> | empty}

- - -foregroundPixel

Specifies which entry in the color table is used for an object's text and borders.

set the foregroundPixel of <object> to <colorNumber>

- - -height

Specifies the distance from an object's top edge to its bottom edge.

set the height of <object> to <numberOfPixels>

- - -hiliteColor

Specifies the color of the background when an object, or text in an object, is highlighted.

set the hiliteColor [of <object>] to {empty | <colorName> | <RGBColor>}

- - -hilitePattern

Specifies the fill pattern used for the background when an object, or text in an object, is highlighted.

set the hilitePattern of <object> to {<patternNumber> | <imageID> | empty}

- - -hilitePixel

Specifies which entry in the color table is used for the background color when an object, or text in an object, is highlighted.

set the hilitePixel of <object> to <colorNumber>

- - -ID

Reports the unique ID number assigned to an object.

set the ID of {image | stack} to <number>

get the [{ long | abbreviated | short }] ID of <object>

- - -innerGlow

Specifies the inner glow to use for an object

set the innerGlow of object to <propertiesArray>

set the innerGlow[<propertyName>] of object to <propertyValue>

- - -innerShadow

Specifies the inner shadow to use for an object.

set the innerShadow of object to <propertiesArray>

set the innerShadow[<propertyName>] of object to <propertyValue>

- - -invisible

Specifies whether an object is hidden.

set the invisible of <object> to {true | false}

get the [effective] invisible of <object>

- - -joinStyle

Specifies how joins between two lines appear.

set the joinStyle [of graphic] to <style>

- - -label

Specifies the string shown in a stack window's title bar, or a text label to be displayed on the specified object if its showName property is true.

set the label of <object> to <labelString>

- - -layer

Specifies the back-to-front order of objects on a card or the order of cards in a stack.

set the layer of <object> to {<layerNumber> | top | bottom}

- - -layerMode

Specifies whether an object is dynamic or static.

set the layerMode of <object> to <mode>

get the [effective] layerMode of <object>

- - -layoutBreakpoints

Gets the list of layout breakpoints that the object has.

get the layoutBreakpoints of object

- - -layoutMargins

Sets the margin for all four sides of a control.

get the layoutMargins of object

set the layoutMargins of object to {pixels | horizontal, vertical |left, top, right, bottom}

- - -left

Specifies how far an object's left edge is from the left edge of the window or screen.

set the left of <object> to <numberOfPixels>

- - -lineSize

Specifies the thickness of lines and the borders of shapes drawn with the paint tools, or the thickness of lines and borders of graphic objects.

set the lineSize [of <graphic>] to <widthInPixels>

- - -location

Specifies where an object is.

set the location of <object> to <point>

- - -markerDrawn

Specifies whether markers are drawn at each vertex of a curve or irregular polygon graphic.

set the markerDrawn of <graphic> to {true | false}

- - -markerFilled

Specifies whether the markers drawn at each vertex of a polygon graphic are filled or hollow.

set the markerFilled of <graphic> to {true | false}

- - -markerLineSize

The markerLineSize specifies the thickness of the border of markers that are drawn at each vertex of an irregular polygon graphic.

set the markerLineSize of <graphic> to <pixels>

- - -markerPoints

Specifies the shape of markers at each vertex of a curve or polygon graphic.

set the markerPoints of <graphic> to <listOfVertexes>

- - -miterLimit

Specifies how far miter joins can extend from the meeting point of two edges before a bevel join is used.

set the miterLimit [of graphic] to <number>

- - -name

Specifies the name of an object.

set the [{ long | abbreviated | short }] name of <object> to <string>

get the name

- - -number

Specifies an object's position within a file, a card's position within a stack, or a control's layer on a card.

set the number of <card> to <number>

get the number of <object>

- - -order

The order that has a control within its owner.

get the order of object

set the order of object to {<integer>}

- - -outerGlow

Specifies the outer glow to use for an object.

set the outerglow of object to <propertiesArray>

set the outerglow[<propertyName>] of object to <propertyValue>

- - -owner

Reports which object is next in the object hierarchy.

get the [{ long | abbreviated | short }] owner of <object>

- - -patterns

Specifies all the patterns of an object, in shorthand form.

set the patterns of <object> to <patternsList>

- - -points

Specifies where the vertexes of a graphic are located.

set the [effective] points of <graphic> to <vertexList>

- - -polySides

Specifies how many sides a regular polygon has.

set the polySides [of <graphic>] to <numberOfSides>

- - -position

Sets how the object is positioned within its owner.

get the position[propertyName] of object

set the position[propertyName] of object to propertyValue

- - -position align

Aligns the control within its owner.

set the position["type"] of object to "align"

- - -position center

Centers the object with respect to its owner.

set the position["type"] of object to "center"

- - -position fixed

Sets the position of one or more sides of a control with respect to its owner.

set the position["type"] of object to "fixed"

- - -properties

Specifies some of an object's properties and their current values.

set the properties of <object> to <propertiesArray>

- - -rectangle

Specifies the area within which an object is drawn.

set the rectangle of <object> to <left>, <top>, <right>, <bottom>

get the [effective] rectangle of <object>

- - -relativePoints

Specifies where the vertexes of a curve or irregular polygon graphic are located, relative to the graphic's rectangle.

set the [effective] relativePoints of <graphic> to <vertexList>

- - -right

Specifies how far an object's right edge is from the left edge of the window or screen.

set the right of <object> to <pixels>

- - -roundEnds

Specifies whether lines have rounded ends or squared-off ends.

set the roundEnds [of graphic] to {true | false}

- - -script

Specifies the contents of an object's script.

set the script of <object> to <string>

- - -selected

Specifies whether an object is selected.

set the selected of <object> to {true | false}

- - -shadowColor

Specifies the color of an object's drop shadow or the background of a scrollbar.

set the shadowColor of <object> to {empty | <colorName> | <RGBColor>}

- - -shadowOffset

Specifies the size and direction of an object's drop shadow.

set the shadowOffset of <object> to <pixels>

- - -shadowPattern

Specifies the pattern of an object's drop shadow.

set the shadowPattern of <object> to {<patternNumber> | <imageID> | empty}

- - -shadowPixel

Specifies which entry in the color table is used for the color of an object's drop shadow or the background of a scrollbar.

set the shadowPixel of <object> to <colorNumber>

- - -showBorder

Specifies whether an outline is drawn around an object.

set the showBorder of <object> to {true | false}

- - -showFocusBorder

Displays a border around the active control.

set the showFocusBorder of <control> to {true | false}

- - -showName

Specifies whether an object's name is displayed within it.

set the showName of {<button> | <graphic> | <group>} to {true | false}

- - -startArrow

Specifies whether a line graphic or the first vertex in an irregular polygon graphic has an arrowhead.

set the startArrow of <graphic> to {true | false}

- - -strokeGradient

Specifies the gradient to use to fill the border lines of the graphic object.

set the strokeGradient [of graphic] to <propertiesArray>

- - -textFont

Specifies the font face of text in an object.

set the textFont of <object> to <fontName> [, <language>]

set the textFont of [<chunk> of] <field> to <fontName> [, <language>]

- - -textSize

Specifies the point size of text displayed by an object.

set the textSize of <object> to <pointSize>

set the textSize of [<chunk> of] <field> to <pointSize>

- - -textStyle

Specifies the style or styles applied to text in an object.

set the textStyle of <object> to {empty | plain | <stylesList>}

set the textStyle of [<chunk> of] <field> to {empty | plain | <stylesList>}

set the textStyle[<style>] of object to {true | false}

- - -threeD

Specifies whether an object appears to stick out of or recede into the screen.

set the threeD of <object> to {true | false}

- - -top

Specifies how far an object's top edge is from the top of the window or screen.

set the top of <object> to <numberOfPixels>

- - -topColor

Specifies the color of a three-D object's raised edge.

set the topColor of <object> to {empty | <colorName> | <RGBColor>}

- - -topLeft

Specifies the location of the specified object's upper left corner.

set the topLeft of <object> to left,top

- - -topPattern

Specifies the pattern used to draw a three-D object's raised edge.

set the topPattern of <object> to {<patternNumber> | <imageID> | empty}

- - -topPixel

Specifies which entry in the color table is used for the color of a three-D object's raised edge.

set the topPixel of <object> to <colorNumber>

- - -topRight

Specifies the location of the specified object's upper right corner.

set the topRight of <object> to <right>, <top>

- - -unicodeLabel

Specifies the UTF-16 string to be displayed on the specified object if its showName property is true.

set the unicodeLabel of object to labelString

- - -unicodeTooltip

Specifies the explanatory text (UTF-16 string) that pops up in a small box when the user points to an object.

set the unicodeTooltip of object to <unicodeString>

- - -visible

Specifies whether an object can be seen or is hidden.

set the [effective] visible of <object> to {true | false}

- - -width

The width of an object is the distance from its left edge to its right edge.

set the width of <object> to <numberOfPixels>