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 ded09ff77c3cb7e8a5f0666434806f7be8aebf63 (commit)
from a9450959b372c0d3c47b09b1714c7563808756ee (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/ded09ff77c3cb7e8a5f0666434806f7be8ae…
commit ded09ff77c3cb7e8a5f0666434806f7be8aebf63
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Fri Aug 10 22:43:02 2012 +0200
tests: Remove SDL based showimage.
Similar test already exists.
diff --git a/tests/SDL/Makefile b/tests/SDL/Makefile
index 6f83335..c11568d 100644
--- a/tests/SDL/Makefile
+++ b/tests/SDL/Makefile
@@ -8,7 +8,7 @@ ifeq ($(HAVE_LIBSDL),yes)
CSOURCES=$(shell echo *.c)
APPS=pixeltest fonttest linetest randomshapetest- symbolstest textaligntest trianglefps blittest subcontext showimage+ symbolstest textaligntest trianglefps blittest subcontext aatest mixpixeltest
endif
diff --git a/tests/SDL/showimage.c b/tests/SDL/showimage.c
deleted file mode 100644
index a63ba78..0000000
--- a/tests/SDL/showimage.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*****************************************************************************
- * 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-2011 Cyril Hrubis <metan(a)ucw.cz> *
- * *
- *****************************************************************************/
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <SDL/SDL.h>
-
-#include "GP.h"
-#include "GP_SDL.h"
-
-SDL_Surface *display = NULL;
-GP_Context context, *bitmap;
-
-int brightness = 0;
-
-void event_loop(void)
-{
- SDL_Event event;
- GP_Context *res;
-
- while (SDL_WaitEvent(&event) > 0) {
-
- switch (event.type) {
-
- case SDL_KEYDOWN:
- switch (event.key.keysym.sym) {
- case SDLK_ESCAPE:
- return;
- case SDLK_UP:
- brightness+=2;
- case SDLK_DOWN: {
- brightness-=1;
-
- GP_FILTER_PARAMS(bitmap->pixel_type, param);
- GP_FilterParamSetIntAll(param, brightness);
- res = GP_FilterBrightness(bitmap, NULL, param, NULL);
-
- printf("brightness = %i %ux%un", brightness, res->w, res->h);
-
- GP_Blit(res, 0, 0, res->w, res->h, &context, 0, 0);
- SDL_Flip(display);
- GP_ContextFree(res);
- } break;
- default:
- break;
- }
- break;
- case SDL_QUIT:
- return;
- default:
- break;
- }
- }
-}
-
-int main(int argc, char *argv[])
-{
- /* Bits per pixel to be set for the display surface. */
- int display_bpp = 0;
-
- int i;
- for (i = 1; i < argc; i++) {
- if (strcmp(argv[i], "-16") == 0) {
- display_bpp = 16;
- }
- else if (strcmp(argv[i], "-24") == 0) {
- display_bpp = 24;
- }
- else if (strcmp(argv[i], "-32") == 0) {
- display_bpp = 32;
- }
- }
-
- GP_SetDebugLevel(10);
-
- if ((bitmap = GP_LoadImage(argv[1], NULL)) == NULL) {
- fprintf(stderr, "Failed to load bitmap: %sn", strerror(errno));
- return 1;
- }
-
- /* Initialize SDL */
- if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) != 0) {
- fprintf(stderr, "Could not initialize SDL: %sn", SDL_GetError());
- return 1;
- }
-
- /* Create a window with a software back surface */
- display = SDL_SetVideoMode(bitmap->w, bitmap->h, display_bpp, SDL_SWSURFACE);
- if (display == NULL) {
- fprintf(stderr, "Could not open display: %sn", SDL_GetError());
- goto fail;
- }
-
- GP_SDL_ContextFromSurface(&context, display);
-
- GP_Blit(bitmap, 0, 0, bitmap->w, bitmap->h, &context, 0, 0);
- SDL_Flip(display);
-
- event_loop();
-
- SDL_Quit();
- return 0;
-fail:
- SDL_Quit();
- return 1;
-}
-
-----------------------------------------------------------------------
Summary of changes:
tests/SDL/Makefile | 2 +-
tests/SDL/showimage.c | 127 -------------------------------------------------
2 files changed, 1 insertions(+), 128 deletions(-)
delete mode 100644 tests/SDL/showimage.c
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
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 1cb6c5439748776bff0baa03e9be4d5ceea9dbbc (commit)
from 1b13c9d73865b69c4c52c27a5328fd7aea68b805 (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/1cb6c5439748776bff0baa03e9be4d5ceea9…
commit 1cb6c5439748776bff0baa03e9be4d5ceea9dbbc
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Fri Aug 10 18:37:58 2012 +0200
pywrap: Add error checks for PXM loaders.
diff --git a/pylib/gfxprim/loaders/loaders.i b/pylib/gfxprim/loaders/loaders.i
index 2e54d41..9561176 100644
--- a/pylib/gfxprim/loaders/loaders.i
+++ b/pylib/gfxprim/loaders/loaders.i
@@ -44,9 +44,14 @@ ERROR_ON_NONZERO(GP_SavePNG);
%include "GP_PNG.h"
-/* TODO: No error checking - legacy GP_RetCode form */
+ERROR_ON_NULL(GP_LoadPBM);
+ERROR_ON_NULL(GP_LoadPGM);
+ERROR_ON_NULL(GP_LoadPPM);
+ERROR_ON_NONZERO(GP_SavePBM);
+ERROR_ON_NONZERO(GP_SavePGM);
+ERROR_ON_NONZERO(GP_SavePPM);
+
%include "GP_PBM.h"
%include "GP_PGM.h"
%include "GP_PPM.h"
-
-----------------------------------------------------------------------
Summary of changes:
pylib/gfxprim/loaders/loaders.i | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")