$imagePositionBase

Control the base position for drawing images or objects. By default, the base position is topleft. This allows you to easily position elements relative to the top-left, center, or bottom-right of your image.

Usage

$imagePositionBase[Base]

Parameter:

  • Base: Specifies the base position. Must be one of the valid values listed below.

Base Values:

The following values are accepted for the Base parameter:

  • topleft: Top-left corner
  • top: Top-center
  • topright: Top-right corner
  • centerleft: Center-left
  • center: Center
  • centerright: Center-right
  • bottomleft: Bottom-left corner
  • bottom: Bottom-center
  • bottomright: Bottom-right corner

Example:

This example creates an image, sets the base position to centerleft, draws a white square, then sets the base position to centerright and draws a red square.

Member04/23/2025
!!exec $imageCreate[300;300]
$imagePositionBase[centerleft]
$imageFill[white;center;center;100;100]
$imagePositionBase[centerright]
$imageFill[red;center;center;100;100]
$image[$imageOutput]

Custom Command Bot 04/23/2025