Skip to content

menu Image Rectangle

menu Image Rectangle {name} {x1} {y1} {x2} {y2} {colour} {fill} [width]

Also searchable as: menu Image Rectangle

menu Image Rectangle draws a rectangle with corners x1, y1 and x2, y2 in an image. Positions are inside the image, 0, 0 being its top-left corner.

Parameter Meaning
name Name of an image created with menu Image Create.
x1, y1, x2, y2 Two opposite corners.
colour A colour, see Colours: a name such as red or btnface, or a $BBGGRR number.
fill #true (any number other than 0) fills it with the same colour; #false (0) draws only the outline.
width Optional outline width in pixels. Default: 1.

$FEEEED is the transparent colour of images: painting with it makes those pixels see-through. A filled rectangle is the usual way to give an image a background.

menu Clear
menu Window Size 84 84
menu Image Create pic 10 10 64 64
menu Image Rectangle pic 0 0 64 64 white #true
menu Image Rectangle pic 4 4 60 60 black #false 2
menu Show
halt
  • 1.6: a negative second corner (x2, y2) is refused.

See also

Based on the EasyUO wiki, edited for EasyUO Reforged. This text is available under the GNU Free Documentation License 1.2.

The EasyUO 1.6 behaviour on this page was researched with help from the ScriptUO community: Gaderian's tutorial New Menu Code and how to adapt old scripts and the scripts its members share at scriptuo.com.