#include <assert.h>#include <stdbool.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <mpfr.h>#include "parse.h"#include "parse_mdz_corners.h"
Include dependency graph for parse_mdz_corners.c:Go to the source code of this file.
Functions | |
| bool | parse_mdz_corners (const char *source, int length, mpfr_t cx, mpfr_t cy, mpfr_t cz) |
Parse MDZ .mdz file format (corners variant). | |
| bool parse_mdz_corners | ( | const char * | source, |
| int | length, | ||
| mpfr_t | cx, | ||
| mpfr_t | cy, | ||
| mpfr_t | cz | ||
| ) |
Parse MDZ .mdz file format (corners variant).
File format example:
precision 80 aspect 1.33333 xmin -2.5 xmax 1.5 ymax 1.5
Converting from corners is tricky, but luckily .mdz specifies the precision needed so we don't have to guess it. Then:
cz = (xmax - xmin) / (2 * aspect) cx = (xmax + xmin) / 2 cy = (ymax - cz)
| source | A null-terminated input file already loaded into memory. |
| length | Length of the input file (without the extra null terminator). |
| cx | For output of the real part of the view center. It is already mpfr_init2()'d. |
| cy | For output of the imaginary part of the view center. It is already mpfr_init2()'d. |
| cz | For output of the view radius. It is already mpfr_init2()'d. |
true) or failure (false). Definition at line 15 of file parse_mdz_corners.c.
References parse_line().
Here is the call graph for this function: