Skip to content

Commit 5c95025

Browse files
committed
[WIP] Commands refresh
1 parent 699ac3d commit 5c95025

31 files changed

+580
-132
lines changed

api/app_command.md

Lines changed: 193 additions & 94 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: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ app.command.BrightnessContrast {
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/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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ app.command.ColorCurve {
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:

api/command/ColorQuantization.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# ColorQuantization
2+
3+
```lua
4+
app.command.ColorQuantization {
5+
ui=true,
6+
withAlpha=bool,
7+
maxColors=int,
8+
useRange=bool,
9+
algorithm=string,
10+
}
11+
```
12+
13+
* `ui`: Shows the dialog on the screen, `true` by default.
14+
* `withAlpha`: Create entries with alpha component, defaults to `true`
15+
* `maxColors`: Color amount limit, defaults to `256`
16+
* `useRange`: Replace current range, defaults to `false`
17+
* `algorithm`: One of `"default"`, `"rgb5a3"` or `"octree"`
18+
19+
## Example
20+
21+
```lua
22+
app.command.ColorQuantization {
23+
ui=true,
24+
withAlpha=false,
25+
maxColors=100,
26+
algorithm="octree"
27+
}
28+
```

api/command/ConvolutionMatrix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
app.command.ConvolutionMatrix {
55
ui=true,
66
channels=FilterChannels...,
7-
tiledMode=none,
7+
tiledMode=string,
88
fromResource=string
99
}
1010
```

0 commit comments

Comments
 (0)