This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 548b430abfdc45d7fdae3c88fc998c9431179f54 (commit) from 017a24fe557af8dfd0f3b98796ef439db5246a84 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/548b430abfdc45d7fdae3c88fc998c9431179...
commit 548b430abfdc45d7fdae3c88fc998c9431179f54 Author: Cyril Hrubis metan@ucw.cz Date: Sun Feb 19 21:36:52 2012 +0100
backends: Fix the backend Flip().
After the transformation, make sure that x0 <= x1 and y0 <= y1.
diff --git a/include/backends/GP_Backend.h b/include/backends/GP_Backend.h index 25d6b7e..c83a411 100644 --- a/include/backends/GP_Backend.h +++ b/include/backends/GP_Backend.h @@ -42,7 +42,6 @@ #ifndef BACKENDS_GP_BACKEND_H #define BACKENDS_GP_BACKEND_H
-#include "core/GP_Transform.h" #include "core/GP_Context.h"
struct GP_Backend; @@ -127,15 +126,9 @@ static inline void GP_BackendFlip(GP_Backend *backend) /* * Calls backend->UpdateRect(). */ -static inline void GP_BackendUpdateRect(GP_Backend *backend, - GP_Coord x0, GP_Coord y0, - GP_Coord x1, GP_Coord y1) -{ - GP_TRANSFORM_POINT(backend->context, x0, y0); - GP_TRANSFORM_POINT(backend->context, x1, y1); - - backend->UpdateRect(backend, x0, y0, x1, y1); -} +void GP_BackendUpdateRect(GP_Backend *backend, + GP_Coord x0, GP_Coord y0, + GP_Coord x1, GP_Coord y1);
/* * Calls backend->Exit(). diff --git a/libs/backends/GP_Backend.c b/libs/backends/GP_Backend.c new file mode 100644 index 0000000..d878760 --- /dev/null +++ b/libs/backends/GP_Backend.c @@ -0,0 +1,42 @@ +/***************************************************************************** + * This file is part of gfxprim library. * + * * + * Gfxprim is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * Gfxprim is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with gfxprim; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin Street, Fifth Floor, * + * Boston, MA 02110-1301 USA * + * * + * Copyright (C) 2009-2012 Cyril Hrubis metan@ucw.cz * + * * + *****************************************************************************/ + +#include "core/GP_Common.h" +#include "core/GP_Transform.h" + +#include "backends/GP_Backend.h" + +void GP_BackendUpdateRect(GP_Backend *backend, + GP_Coord x0, GP_Coord y0, + GP_Coord x1, GP_Coord y1) +{ + GP_TRANSFORM_POINT(backend->context, x0, y0); + GP_TRANSFORM_POINT(backend->context, x1, y1); + + if (x1 < x0) + GP_SWAP(x0, x1); + + if (y1 < y0) + GP_SWAP(y0, y1); + + backend->UpdateRect(backend, x0, y0, x1, y1); +}
-----------------------------------------------------------------------
Summary of changes: include/backends/GP_Backend.h | 13 +----- .../GP_Backends.h => libs/backends/GP_Backend.c | 40 ++++++++----------- 2 files changed, 20 insertions(+), 33 deletions(-) copy include/backends/GP_Backends.h => libs/backends/GP_Backend.c (80%)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.