apply_gradient_rect
Applies a linear gradient fill to a rectangular area on a specific layer in an Aseprite file, with adjustable start and end colors and horizontal or vertical orientation.
Instructions
Apply a linear gradient fill to a rectangle.
Args: filename (str): The path to the Aseprite file. layer_name (str): The name of the layer to draw on. frame_index (int): The index of the frame to draw on. x (int): The x coordinate of the rectangle to draw on. y (int): The y coordinate of the rectangle to draw on. width (int): The width of the rectangle to draw on. height (int): The height of the rectangle to draw on. color_start (str): The start color of the gradient. color_end (str): The end color of the gradient. horizontal (bool, optional): Whether to draw the gradient horizontally. Defaults to True. create_if_missing (bool, optional): Whether to create the layer if it doesn't exist. Defaults to True.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| width | Yes | ||
| height | Yes | ||
| filename | Yes | ||
| color_end | Yes | ||
| horizontal | No | ||
| layer_name | Yes | ||
| color_start | Yes | ||
| frame_index | Yes | ||
| create_if_missing | No |