Feedback
- press ENTER to search or ESC to cancel
Table of content
Globals namespaces
Constants
- Align
- AniDir
- BlendMode
- BrushPattern
- BrushType
- ColorMode
- FilterChannels
- Ink
- MouseButton
- MouseCursor
- RangeType
- SelectionMode
- SpriteSheetDataFormat
- SpriteSheetType
- WebSocketMessageType
Classes/objects
- Brush
- Cel
- Color
- ColorSpace
- Dialog
- Editor
- Events
- Frame
- GraphicsContext
- Image
- ImageSpec
- KeyEvent
- Layer
- MouseEvent
- Palette
- Plugin
- Point
- Properties
- Range
- Rectangle
- Selection
- Site
- Size
- Slice
- Sprite
- Tag
- Tile
- Tileset
- Timer
- Tool
- TouchEvent
- Version
- WebSocket
- Window
CanvasSize
app.command.CanvasSize {
ui=true,
left=0,
top=0,
right=0,
bottom=0,
bounds=Rectangle,
trimOutside=false
}
ui
:false
if you don't need to show the dialog to the user.left
/top
/right
/bottom
: How many pixels to add, or remove if the value is negative, to/from left/top/right/bottom sides.bounds
: A new rectangle with the new bounds of the canvas. If you use this argument,left/top/right/bottom
are ignored.trimOutside
: True if you want to delete all the pixel content of cels that will be outside the canvas after the canvas size is modified.
Examples. Add 8 pixels at the left side:
app.command.CanvasSize { ui=false, left=8 }
Add 8 pixels to the left and 8 pixels to the right (new width = old width + 16 pixels):
local r = app.sprite.bounds
r.x = r.x-8
r.width = r.width+16
app.command.CanvasSize { ui=false, bounds=r }