[aseprite] 222/250: Minor change in floodfill.h/cpp
Tobias Hansen
thansen at moszumanska.debian.org
Sun Dec 20 15:27:33 UTC 2015
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit 9225420eba3d8982ee73066eb9c2ef6c171ec60f
Author: David Capello <davidcapello at gmail.com>
Date: Mon Nov 2 16:45:09 2015 -0300
Minor change in floodfill.h/cpp
---
src/doc/algorithm/floodfill.cpp | 23 ++++++++++++-----------
src/doc/algorithm/floodfill.h | 11 ++++++-----
2 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/src/doc/algorithm/floodfill.cpp b/src/doc/algorithm/floodfill.cpp
index fc7deb6..e278eba 100644
--- a/src/doc/algorithm/floodfill.cpp
+++ b/src/doc/algorithm/floodfill.cpp
@@ -125,9 +125,9 @@ inline bool color_equal<IndexedTraits>(color_t c1, color_t c2, int tolerance)
* to the list of drawn segments. Returns the first x coordinate after
* the part of the line which it has dealt with.
*/
-static int flooder(Image *image, int x, int y,
- const gfx::Rect& bounds,
- color_t src_color, int tolerance, void *data, AlgoHLine proc)
+static int flooder(const Image* image, int x, int y,
+ const gfx::Rect& bounds,
+ color_t src_color, int tolerance, void *data, AlgoHLine proc)
{
FLOODED_LINE *p;
int left = 0, right = 0;
@@ -263,9 +263,9 @@ static int flooder(Image *image, int x, int y,
* segments which have already been drawn in order to minimise the required
* number of tests.
*/
-static int check_flood_line(Image* image, int y, int left, int right,
- const gfx::Rect& bounds,
- int src_color, int tolerance, void *data, AlgoHLine proc)
+static int check_flood_line(const Image* image, int y, int left, int right,
+ const gfx::Rect& bounds,
+ int src_color, int tolerance, void *data, AlgoHLine proc)
{
int c;
FLOODED_LINE *p;
@@ -296,7 +296,7 @@ static int check_flood_line(Image* image, int y, int left, int right,
}
template<typename ImageTraits>
-static void replace_color(Image* image, const gfx::Rect& bounds, int src_color, int tolerance, void *data, AlgoHLine proc)
+static void replace_color(const Image* image, const gfx::Rect& bounds, int src_color, int tolerance, void* data, AlgoHLine proc)
{
typename ImageTraits::address_t address;
@@ -322,10 +322,11 @@ static void replace_color(Image* image, const gfx::Rect& bounds, int src_color,
/* floodfill:
* Fills an enclosed area (starting at point x, y) with the specified color.
*/
-void floodfill(Image* image, int x, int y,
- const gfx::Rect& bounds,
- int tolerance, bool contiguous,
- void* data, AlgoHLine proc)
+void floodfill(const Image* image, int x, int y,
+ const gfx::Rect& bounds,
+ int tolerance, bool contiguous,
+ void* data,
+ AlgoHLine proc)
{
// Make sure we have a valid starting point
if ((x < 0) || (x >= image->width()) ||
diff --git a/src/doc/algorithm/floodfill.h b/src/doc/algorithm/floodfill.h
index 6a8e58a..01d939a 100644
--- a/src/doc/algorithm/floodfill.h
+++ b/src/doc/algorithm/floodfill.h
@@ -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.
@@ -17,10 +17,11 @@ namespace doc {
namespace algorithm {
- void floodfill(Image* image, int x, int y,
- const gfx::Rect& bounds,
- int tolerance, bool contiguous,
- void* data, AlgoHLine proc);
+ void floodfill(const Image* image, int x, int y,
+ const gfx::Rect& bounds,
+ int tolerance, bool contiguous,
+ void* data,
+ AlgoHLine proc);
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list