mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-05 21:57:20 +00:00
Remove now unused doc::draw_brush() function
This commit is contained in:
parent
4e6db14cae
commit
98cd5056b3
@ -40,33 +40,6 @@ void put_pixel(Image* image, int x, int y, color_t color)
|
||||
image->putPixel(x, y, color);
|
||||
}
|
||||
|
||||
void draw_brush(Image* image, Brush* brush, int x, int y, color_t fg, color_t bg)
|
||||
{
|
||||
ASSERT(image);
|
||||
ASSERT(brush);
|
||||
|
||||
Image* brush_image = brush->image();
|
||||
const gfx::Rect& brushBounds = brush->bounds();
|
||||
|
||||
x += brushBounds.x;
|
||||
y += brushBounds.y;
|
||||
|
||||
if (fg == bg) {
|
||||
fill_rect(image, x, y, x+brushBounds.w-1, y+brushBounds.h-1, bg);
|
||||
}
|
||||
else {
|
||||
int u, v;
|
||||
for (v=0; v<brushBounds.h; v++) {
|
||||
for (u=0; u<brushBounds.w; u++) {
|
||||
if (get_pixel(brush_image, u, v))
|
||||
put_pixel(image, x+u, y+v, fg);
|
||||
else
|
||||
put_pixel(image, x+u, y+v, bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void clear_image(Image* image, color_t color)
|
||||
{
|
||||
ASSERT(image);
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite Document Library
|
||||
// Copyright (c) 2001-2014 David Capello
|
||||
// Copyright (c) 2001-2015 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -19,7 +19,6 @@ namespace doc {
|
||||
|
||||
color_t get_pixel(const Image* image, int x, int y);
|
||||
void put_pixel(Image* image, int x, int y, color_t c);
|
||||
void draw_brush(Image* image, Brush* brush, int x, int y, color_t fg, color_t bg);
|
||||
|
||||
void clear_image(Image* image, color_t bg);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user