Skip to content

Commit 46dc720

Browse files
committed
Complete Command documentation
1 parent 699ac3d commit 46dc720

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+687
-245
lines changed

api/app_command.md

Lines changed: 200 additions & 98 deletions
Large diffs are not rendered by default.

api/command/AddColor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ app.command.AddColor {
77
}
88
```
99

10-
Adds a new color into the palette.
10+
Adds a new color to the palette.
1111

1212
* `source`: Can be `"fg"`, `"bg"`, or `"color"` (default). To add the foreground, background, or a specific color respectively.
13-
* `color`: A [Color](../color.md#color) instance to add too the palette.
13+
* `color`: A [Color](../color.md#color) instance to add to the palette.
1414

1515
## Example
1616

api/command/AutocropSprite.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AutocropSprite
2+
3+
```lua
4+
app.command.AutocropSprite {
5+
byGrid=bool
6+
}
7+
```
8+
9+
Automatically crops the sprite.
10+
11+
* `byGrid`: Aligns the crop to the grid. Optional, defaults to `false`.

api/command/BrightnessContrast.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22

33
```lua
44
app.command.BrightnessContrast {
5-
ui=true,
5+
ui=bool,
66
channels=FilterChannels...,
7-
brightness=0,
8-
contrast=0
7+
brightness=int,
8+
contrast=int
99
}
1010
```
1111

12-
* `ui`: Shows the dialog on the screen, `true` by default. Set to
13-
`false` for automatic change brightness and/or contrast without
14-
asking to the user for the change.
12+
* `ui`: Shows the brightness dialog, `true` by default. Set to `false` to apply the changes immediately without user input or preview.
1513
* `channels`: A combination of [FilterChannels](../filterchannels.md#filterchannels) with
1614
[bitwise OR (`|`) operator](https://www.lua.org/manual/5.3/manual.html#3.4.2).
1715
By default it is equal to:

api/command/CanvasSize.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
```lua
44
app.command.CanvasSize {
5-
ui=true,
6-
left=0,
7-
top=0,
8-
right=0,
9-
bottom=0,
5+
ui=bool,
6+
left=int,
7+
top=int,
8+
right=int,
9+
bottom=int,
1010
bounds=Rectangle,
11-
trimOutside=false
11+
trimOutside=bool
1212
}
1313
```
1414

api/command/CelOpacity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
```lua
44
app.command.CelOpacity {
5-
opacity = 0
5+
opacity=int
66
}
77
```
88

api/command/ChangeBrush.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ChangeBrush
2+
3+
```lua
4+
app.command.ChangeBrush {
5+
change=string
6+
slot=int
7+
}
8+
```
9+
10+
Changes the brush of the active tool
11+
12+
* `change`: Can be: "increment-size", "decrement-size", "increment-angle", "decrement-angle", "flip-x", "flip-y", "flip-d", "rotate-90cw", "custom"
13+
* `slot`: Custom brush slot (optional, only for "custom" change)
14+

api/command/ChangeColor.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# ChangeColor
2+
3+
```lua
4+
app.command.ChangeColor {
5+
target=string
6+
change=string
7+
}
8+
```
9+
10+
Changes the current foreground or background color by moving up or down on the palette by index.
11+
12+
* `target`: Can be `"foreground"` or `"background"`
13+
* `change`: Can be `"increment-index"` or `"decrement-index"`

api/command/ChangePixelFormat.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,23 @@ app.command.ChangePixelFormat {
66
dithering=string,
77
["dithering-matrix"]=string,
88
rgbmap=string,
9-
toGray=string
9+
toGray=string,
10+
fitCriteria=string
1011
}
1112
```
1213

1314
Changes the [ColorMode](../colormode.md) of the active [sprite](../sprite.md)
1415

15-
* `format`: Can be `"rgb"`, `"gray"`, or `"indexed"`.
16-
* `dithering`: Can be `"ordered"`, `"old"` `"error-diffusion"`,
17-
or empty.
18-
* `dithering-matrix`: It can be `"bayer8x8"`, `"bayer4x4"`, or `"bayer2x2"` (when When `dithering` is `ordered` or `old`).
19-
Actually it can be a matrix ID from any extensions ([for example](https://github.com/aseprite/aseprite/blob/fc79146c56f941f834f28809f0d2c4d7fd60076c/data/extensions/bayer-matrices/package.json#L8)).
20-
* `rgmap`: `"octree"`, `"rgb5a3"`, or `"default"` (generally default
16+
* `format`: `"rgb"`, `"gray"`, or `"indexed"`.
17+
* `dithering`: Optional, `"ordered"`, `"old"` `"error-diffusion"`
18+
* `dithering-matrix`: Optional, `"bayer8x8"`, `"bayer4x4"`, or `"bayer2x2"` (when When `dithering` is `ordered` or `old`).
19+
Actually it can be a matrix ID from any extension ([for example](https://github.com/aseprite/aseprite/blob/fc79146c56f941f834f28809f0d2c4d7fd60076c/data/extensions/bayer-matrices/package.json#L8)).
20+
* `rgbmap`: Optional, `"octree"`, `"rgb5a3"`, or `"default"` (generally default
2121
will be octree, but it might change in the future). If nothing is
22-
specified the default configured quantization method from prefereces
22+
specified the default configured quantization method from preferences
2323
will be used if the GUI is enabled.
24-
* `toGray`: `"luma"`, `"hsv"`, or `"hsl"`.
24+
* `toGray`: Optional, `"luma"`, `"hsv"`, or `"hsl"`.
25+
* `fitCriteria`: Optional, `"rgb"`, `"linearizedRGB"`, `"ciexyz"`, `"cielab"`, or `"default"`
2526

2627
## Example
2728

api/command/ColorCurve.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22

33
```lua
44
app.command.ColorCurve {
5-
ui=true,
5+
ui=bool,
66
channels=FilterChannels...,
77
curve={ Point, Point, Point... }
88
}
99
```
1010

1111
* `ui`: Shows the dialog on the screen, `true` by default. Set to
12-
`false` to apply the color curve filter automatically without asking
13-
to the user for the change.
12+
`false` to apply the color curve filter automatically without user input.
1413
* `channels`: A combination of [FilterChannels](../filterchannels.md#filterchannels) with
1514
[bitwise OR (`|`) operator](https://www.lua.org/manual/5.3/manual.html#3.4.2).
1615
By default it is equal to:

0 commit comments

Comments
 (0)