[aseprite] 216/250: Remove IntertwineAsPixelPerfect::PPData struct
Tobias Hansen
thansen at moszumanska.debian.org
Sun Dec 20 15:27:32 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 e9bfa5168cd7a4a02cb4c363e1eb915a86eae969
Author: David Capello <davidcapello at gmail.com>
Date: Thu Oct 29 16:26:52 2015 -0300
Remove IntertwineAsPixelPerfect::PPData struct
---
src/app/tools/intertwiners.h | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/src/app/tools/intertwiners.h b/src/app/tools/intertwiners.h
index 4f21937..b979ae2 100644
--- a/src/app/tools/intertwiners.h
+++ b/src/app/tools/intertwiners.h
@@ -208,19 +208,11 @@ public:
};
class IntertwineAsPixelPerfect : public Intertwine {
- struct PPData {
- Stroke& pts;
- ToolLoop* loop;
- PPData(Stroke& pts, ToolLoop* loop) : pts(pts), loop(loop) { }
- };
-
- static void pixelPerfectLine(int x, int y, PPData* data)
- {
+ static void pixelPerfectLine(int x, int y, Stroke* stroke) {
gfx::Point newPoint(x, y);
-
- if (data->pts.empty() ||
- data->pts.lastPoint() != newPoint) {
- data->pts.addPoint(newPoint);
+ if (stroke->empty() ||
+ stroke->lastPoint() != newPoint) {
+ stroke->addPoint(newPoint);
}
}
@@ -238,15 +230,13 @@ public:
m_pts = stroke;
}
else {
- PPData data(m_pts, loop);
-
for (int c=0; c+1<stroke.size(); ++c) {
algo_line(
stroke[c].x,
stroke[c].y,
stroke[c+1].x,
stroke[c+1].y,
- (void*)&data,
+ (void*)&m_pts,
(AlgoPixel)&IntertwineAsPixelPerfect::pixelPerfectLine);
}
}
--
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