Permalink
Please sign in to comment.
Showing
with
67 additions
and 142 deletions.
- +1 −1 CONTRIBUTING.txt
- +2 −2 Makefile.am
- +64 −15 src/openslide-grid.c
- +0 −1 src/openslide-ops-jpeg.c
- +0 −1 src/openslide-ops-ngr.c
- +0 −1 src/openslide-ops-tiff.c
- +0 −78 src/openslide-tilehelper.c
- +0 −42 src/openslide-tilehelper.h
- +0 −1 src/openslide.c
| @@ -1,78 +0,0 @@ | ||
| -/* | ||
| - * OpenSlide, a library for reading whole slide image files | ||
| - * | ||
| - * Copyright (c) 2007-2009 Carnegie Mellon University | ||
| - * All rights reserved. | ||
| - * | ||
| - * OpenSlide 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, version 2.1. | ||
| - * | ||
| - * OpenSlide 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 OpenSlide. If not, see | ||
| - * <http://www.gnu.org/licenses/>. | ||
| - * | ||
| - */ | ||
| - | ||
| -#include <config.h> | ||
| - | ||
| -#include "openslide-private.h" | ||
| -#include "openslide-tilehelper.h" | ||
| - | ||
| -#include <glib.h> | ||
| -#include <string.h> | ||
| -#include <math.h> | ||
| -#include <cairo.h> | ||
| - | ||
| -void _openslide_read_tiles(cairo_t *cr, | ||
| - struct _openslide_level *level, | ||
| - int64_t start_tile_x, int64_t start_tile_y, | ||
| - int64_t end_tile_x, int64_t end_tile_y, | ||
| - double offset_x, double offset_y, | ||
| - double advance_x, double advance_y, | ||
| - openslide_t *osr, | ||
| - void *arg, | ||
| - _openslide_tileread_fn read_tile) { | ||
| - //g_debug("offset: %g %g, advance: %g %g", offset_x, offset_y, advance_x, advance_y); | ||
| - if (fabs(offset_x) >= advance_x) { | ||
| - _openslide_set_error(osr, "internal error: fabs(offset_x) >= advance_x"); | ||
| - return; | ||
| - } | ||
| - if (fabs(offset_y) >= advance_y) { | ||
| - _openslide_set_error(osr, "internal error: fabs(offset_y) >= advance_y"); | ||
| - return; | ||
| - } | ||
| - | ||
| - // cairo_set_source_rgb(cr, 0, 1, 0); | ||
| - // cairo_paint(cr); | ||
| - //g_debug("offset: %d %d", offset_x, offset_y); | ||
| - | ||
| - //g_debug("start: %" G_GINT64_FORMAT " %" G_GINT64_FORMAT, start_tile_x, start_tile_y); | ||
| - //g_debug("end: %" G_GINT64_FORMAT " %" G_GINT64_FORMAT, end_tile_x, end_tile_y); | ||
| - | ||
| - cairo_matrix_t matrix; | ||
| - cairo_get_matrix(cr, &matrix); | ||
| - | ||
| - int64_t tile_y = end_tile_y - 1; | ||
| - | ||
| - while (tile_y >= start_tile_y) { | ||
| - double translate_y = ((tile_y - start_tile_y) * advance_y) - offset_y; | ||
| - int64_t tile_x = end_tile_x - 1; | ||
| - | ||
| - while (tile_x >= start_tile_x) { | ||
| - double translate_x = ((tile_x - start_tile_x) * advance_x) - offset_x; | ||
| - // g_debug("read_tiles %" G_GINT64_FORMAT " %" G_GINT64_FORMAT, tile_x, tile_y); | ||
| - cairo_translate(cr, translate_x, translate_y); | ||
| - read_tile(osr, cr, level, tile_x, tile_y, arg); | ||
| - cairo_set_matrix(cr, &matrix); | ||
| - tile_x--; | ||
| - } | ||
| - | ||
| - tile_y--; | ||
| - } | ||
| -} |
| @@ -1,42 +0,0 @@ | ||
| -/* | ||
| - * OpenSlide, a library for reading whole slide image files | ||
| - * | ||
| - * Copyright (c) 2007-2009 Carnegie Mellon University | ||
| - * All rights reserved. | ||
| - * | ||
| - * OpenSlide 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, version 2.1. | ||
| - * | ||
| - * OpenSlide 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 OpenSlide. If not, see | ||
| - * <http://www.gnu.org/licenses/>. | ||
| - * | ||
| - */ | ||
| - | ||
| -#ifndef OPENSLIDE_OPENSLIDE_TILEHELPER_H_ | ||
| -#define OPENSLIDE_OPENSLIDE_TILEHELPER_H_ | ||
| - | ||
| -#include <config.h> | ||
| - | ||
| -#include "openslide-private.h" | ||
| - | ||
| -#include <stdbool.h> | ||
| -#include <stdint.h> | ||
| -#include <cairo.h> | ||
| - | ||
| -void _openslide_read_tiles(cairo_t *cr, | ||
| - struct _openslide_level *level, | ||
| - int64_t start_tile_x, int64_t start_tile_y, | ||
| - int64_t end_tile_x, int64_t end_tile_y, | ||
| - double offset_x, double offset_y, | ||
| - double advance_x, double advance_y, | ||
| - openslide_t *osr, | ||
| - void *arg, | ||
| - _openslide_tileread_fn read_tile); | ||
| -#endif |
0 comments on commit
fe42ba2