[aseprite] 35/51: Add crop_image() with a gfx::Rect
Tobias Hansen
thansen at moszumanska.debian.org
Mon Jul 11 21:35:18 UTC 2016
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit b13ac1d3404e05a8378c81f93be6167f3b96b5be
Author: David Capello <davidcapello at gmail.com>
Date: Fri Jul 1 18:42:10 2016 -0300
Add crop_image() with a gfx::Rect
---
src/doc/primitives.cpp | 5 +++++
src/doc/primitives.h | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/doc/primitives.cpp b/src/doc/primitives.cpp
index 1f84615..94cbf97 100644
--- a/src/doc/primitives.cpp
+++ b/src/doc/primitives.cpp
@@ -78,6 +78,11 @@ Image* crop_image(const Image* image, int x, int y, int w, int h, color_t bg, co
return trim;
}
+Image* crop_image(const Image* image, const gfx::Rect& bounds, color_t bg, const ImageBufferPtr& buffer)
+{
+ return crop_image(image, bounds.x, bounds.y, bounds.w, bounds.h, bg, buffer);
+}
+
void rotate_image(const Image* src, Image* dst, int angle)
{
ASSERT(src);
diff --git a/src/doc/primitives.h b/src/doc/primitives.h
index 3d8632d..0fb7ac9 100644
--- a/src/doc/primitives.h
+++ b/src/doc/primitives.h
@@ -1,5 +1,5 @@
// Aseprite Document Library
-// Copyright (c) 2001-2015 David Capello
+// Copyright (c) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@@ -26,6 +26,7 @@ namespace doc {
void copy_image(Image* dst, const Image* src);
void copy_image(Image* dst, const Image* src, int x, int y);
Image* crop_image(const Image* image, int x, int y, int w, int h, color_t bg, const ImageBufferPtr& buffer = ImageBufferPtr());
+ Image* crop_image(const Image* image, const gfx::Rect& bounds, color_t bg, const ImageBufferPtr& buffer = ImageBufferPtr());
void rotate_image(const Image* src, Image* dst, int angle);
void draw_hline(Image* image, int x1, int y, int x2, color_t c);
--
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