Handle state related to tiled rendering. More...
#include <stdbool.h>
#include <mpfr.h>
Go to the source code of this file.
Data Structures | |
struct | tiling |
Tiling state structure. More... |
Functions | |
void | tiling_begin (struct tiling *tiling, int cols, int rows, int width, int height, const mpfr_t centerx, const mpfr_t centery, const mpfr_t radius) |
Initialize a tiling. | |
void | tiling_end (struct tiling *tiling) |
Clean up a tiling. | |
bool | tiling_next (struct tiling *tiling) |
Advance to the next tile. |
Handle state related to tiled rendering.
Definition in file tiling.h.
struct tiling |
Tiling state structure.
Should be read-only outside tiling.c.
void tiling_begin | ( | struct tiling * | tiling, |
int | cols, | ||
int | rows, | ||
int | width, | ||
int | height, | ||
const mpfr_t | centerx, | ||
const mpfr_t | centery, | ||
const mpfr_t | radius | ||
) |
Initialize a tiling.
tiling | The tiling to initialize. |
cols | The number of tiles horizontally. |
rows | The number of tiles vertically. |
width | The image width of each tile in pixels. |
height | The image height of each tile in pixels. |
centerx | The real coordinate of the tiled view center. |
centery | The imaginary coordinate of the tiled view center. |
radius | The radius of the tiled view. |
Definition at line 25 of file tiling.c.
References tiling::centerx, tiling::centery, tiling::col, tiling::height, tiling::radius, tiling::row, tiling::tiled_centerx, tiling::tiled_centery, tiling::tiled_cols, tiling::tiled_radius, tiling::tiled_rows, and tiling::width.
Referenced by main().
void tiling_end | ( | struct tiling * | tiling | ) |
Clean up a tiling.
tiling | The tiling to clean up. |
Definition at line 46 of file tiling.c.
References tiling::centerx, tiling::centery, tiling::radius, tiling::tiled_centerx, tiling::tiled_centery, and tiling::tiled_radius.
Referenced by main().
bool tiling_next | ( | struct tiling * | tiling | ) |
Advance to the next tile.
Should be called before rendering the first tile.
tiling | The tiling to advance. |
Definition at line 58 of file tiling.c.
References tiling::centerx, tiling::centery, tiling::col, tiling::height, pixel_coordinate(), tiling::radius, tiling::row, tiling::tiled_centerx, tiling::tiled_centery, tiling::tiled_cols, tiling::tiled_radius, tiling::tiled_rows, and tiling::width.
Referenced by main().