| 1 | // Aseprite Document Library |
| 2 | // Copyright (c) 2020 Igara Studio S.A. |
| 3 | // Copyright (c) 2018 David Capello |
| 4 | // |
| 5 | // This file is released under the terms of the MIT license. |
| 6 | // Read LICENSE.txt for more information. |
| 7 | |
| 8 | #ifndef DOC_ALGORITHM_FILL_SELECTION_H_INCLUDED |
| 9 | #define DOC_ALGORITHM_FILL_SELECTION_H_INCLUDED |
| 10 | #pragma once |
| 11 | |
| 12 | #include "doc/color.h" |
| 13 | #include "gfx/rect.h" |
| 14 | |
| 15 | namespace doc { |
| 16 | class Grid; |
| 17 | class Image; |
| 18 | class Mask; |
| 19 | |
| 20 | namespace algorithm { |
| 21 | |
| 22 | void fill_selection( |
| 23 | Image* image, |
| 24 | const gfx::Rect& imageBounds, |
| 25 | const Mask* mask, |
| 26 | // This can be a color_t or a tile_t if the image is a tilemap |
| 27 | const color_t color, |
| 28 | // Optional grid for tilemaps |
| 29 | const Grid* grid = nullptr); |
| 30 | |
| 31 | } // namespace algorithm |
| 32 | } // namespace doc |
| 33 | |
| 34 | #endif |
| 35 | |