Data Structures | |
struct | stp_papersize_t |
The papersize data type. More... | |
Enumerations | |
enum | stp_papersize_unit_t { PAPERSIZE_ENGLISH_STANDARD, PAPERSIZE_METRIC_STANDARD, PAPERSIZE_ENGLISH_EXTENDED, PAPERSIZE_METRIC_EXTENDED } |
Units of measurement. More... | |
enum | stp_papersize_type_t { PAPERSIZE_TYPE_STANDARD = 0, PAPERSIZE_TYPE_ENVELOPE } |
Functions | |
int | stp_known_papersizes (void) |
Get the number of available papersizes. | |
const stp_papersize_t * | stp_get_papersize_by_name (const char *name) |
Get a papersize by name. | |
const stp_papersize_t * | stp_get_papersize_by_size (int length, int width) |
Get a papersize by size. | |
const stp_papersize_t * | stp_get_papersize_by_size_exact (int length, int width) |
Get a papersize by size if an exact match is found. | |
const stp_papersize_t * | stp_get_papersize_by_index (int idx) |
Get a papersize by its index number. | |
void | stp_default_media_size (const stp_vars_t *v, int *width, int *height) |
Get the default paper dimensions for the current configuration. |
enum stp_papersize_type_t |
enum stp_papersize_unit_t |
Units of measurement.
void stp_default_media_size | ( | const stp_vars_t * | v, | |
int * | width, | |||
int * | height | |||
) |
Get the default paper dimensions for the current configuration.
The default is derived from the PageSize parameter if set, otherwise the default page size for the printer is used. If no value can be determined, 1x1 will be returned.
v | the Gutenprint vars object | |
width | pointer to storage that the width will be returned in. | |
height | pointer to storage that the height will be returned in. |
const stp_papersize_t* stp_get_papersize_by_index | ( | int | idx | ) |
Get a papersize by its index number.
idx | the index number. This must not be greater than (total number of papers - 1). |
const stp_papersize_t* stp_get_papersize_by_name | ( | const char * | name | ) |
Get a papersize by name.
name | the short unique name of the paper. |
const stp_papersize_t* stp_get_papersize_by_size | ( | int | length, | |
int | width | |||
) |
Get a papersize by size.
The nearest available size to the size requested will be found. Only paper sizes within 5 points of width and height will be considered.
length | the length of the paper. | |
width | the width of the paper |
const stp_papersize_t* stp_get_papersize_by_size_exact | ( | int | length, | |
int | width | |||
) |
Get a papersize by size if an exact match is found.
length | the length of the paper. | |
width | the width of the paper |
int stp_known_papersizes | ( | void | ) |
Get the number of available papersizes.