mupdf
Loading...
Searching...
No Matches
device.h File Reference
Include dependency graph for device.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fz_function
struct  fz_device_container_stack
struct  fz_device
struct  fz_cookie
struct  fz_culling_options
struct  fz_draw_options

Macros

#define fz_new_derived_function(CTX, TYPE, SIZE, M, N, EVAL, DROP)
#define fz_new_derived_device(CTX, TYPE)
#define fz_new_derived_passthrough_device(CTX, PASSTHRU, TYPE)

Typedefs

typedef struct fz_device fz_device
typedef struct fz_function fz_function
typedef void fz_function_eval_fn(fz_context *, fz_function *, const float *, float *)

Enumerations

enum  {
  FZ_DEVFLAG_MASK = 1 , FZ_DEVFLAG_COLOR = 2 , FZ_DEVFLAG_UNCACHEABLE = 4 , FZ_DEVFLAG_FILLCOLOR_UNDEFINED = 8 ,
  FZ_DEVFLAG_STROKECOLOR_UNDEFINED = 16 , FZ_DEVFLAG_STARTCAP_UNDEFINED = 32 , FZ_DEVFLAG_DASHCAP_UNDEFINED = 64 , FZ_DEVFLAG_ENDCAP_UNDEFINED = 128 ,
  FZ_DEVFLAG_LINEJOIN_UNDEFINED = 256 , FZ_DEVFLAG_MITERLIMIT_UNDEFINED = 512 , FZ_DEVFLAG_LINEWIDTH_UNDEFINED = 1024 , FZ_DEVFLAG_BBOX_DEFINED = 2048 ,
  FZ_DEVFLAG_GRIDFIT_AS_TILED = 4096 , FZ_DEVFLAG_DASH_PATTERN_UNDEFINED = 8192
}
enum  {
  FZ_BLEND_NORMAL , FZ_BLEND_MULTIPLY , FZ_BLEND_SCREEN , FZ_BLEND_OVERLAY ,
  FZ_BLEND_DARKEN , FZ_BLEND_LIGHTEN , FZ_BLEND_COLOR_DODGE , FZ_BLEND_COLOR_BURN ,
  FZ_BLEND_HARD_LIGHT , FZ_BLEND_SOFT_LIGHT , FZ_BLEND_DIFFERENCE , FZ_BLEND_EXCLUSION ,
  FZ_BLEND_HUE , FZ_BLEND_SATURATION , FZ_BLEND_COLOR , FZ_BLEND_LUMINOSITY ,
  FZ_BLEND_MODEMASK = 15 , FZ_BLEND_ISOLATED = 16 , FZ_BLEND_KNOCKOUT = 32
}
enum  { FZ_FUNCTION_MAX_N = FZ_MAX_COLORS , FZ_FUNCTION_MAX_M = FZ_MAX_COLORS }
enum  { fz_device_container_stack_is_clip , fz_device_container_stack_is_mask , fz_device_container_stack_is_group , fz_device_container_stack_is_tile }
enum  fz_structure {
  FZ_STRUCTURE_INVALID = -1 , FZ_STRUCTURE_DOCUMENT , FZ_STRUCTURE_PART , FZ_STRUCTURE_ART ,
  FZ_STRUCTURE_SECT , FZ_STRUCTURE_DIV , FZ_STRUCTURE_BLOCKQUOTE , FZ_STRUCTURE_CAPTION ,
  FZ_STRUCTURE_TOC , FZ_STRUCTURE_TOCI , FZ_STRUCTURE_INDEX , FZ_STRUCTURE_NONSTRUCT ,
  FZ_STRUCTURE_PRIVATE , FZ_STRUCTURE_DOCUMENTFRAGMENT , FZ_STRUCTURE_ASIDE , FZ_STRUCTURE_TITLE ,
  FZ_STRUCTURE_FENOTE , FZ_STRUCTURE_SUB , FZ_STRUCTURE_P , FZ_STRUCTURE_H ,
  FZ_STRUCTURE_H1 , FZ_STRUCTURE_H2 , FZ_STRUCTURE_H3 , FZ_STRUCTURE_H4 ,
  FZ_STRUCTURE_H5 , FZ_STRUCTURE_H6 , FZ_STRUCTURE_LIST , FZ_STRUCTURE_LISTITEM ,
  FZ_STRUCTURE_LABEL , FZ_STRUCTURE_LISTBODY , FZ_STRUCTURE_TABLE , FZ_STRUCTURE_TR ,
  FZ_STRUCTURE_TH , FZ_STRUCTURE_TD , FZ_STRUCTURE_THEAD , FZ_STRUCTURE_TBODY ,
  FZ_STRUCTURE_TFOOT , FZ_STRUCTURE_SPAN , FZ_STRUCTURE_QUOTE , FZ_STRUCTURE_NOTE ,
  FZ_STRUCTURE_REFERENCE , FZ_STRUCTURE_BIBENTRY , FZ_STRUCTURE_CODE , FZ_STRUCTURE_LINK ,
  FZ_STRUCTURE_ANNOT , FZ_STRUCTURE_EM , FZ_STRUCTURE_STRONG , FZ_STRUCTURE_RUBY ,
  FZ_STRUCTURE_RB , FZ_STRUCTURE_RT , FZ_STRUCTURE_RP , FZ_STRUCTURE_WARICHU ,
  FZ_STRUCTURE_WT , FZ_STRUCTURE_WP , FZ_STRUCTURE_FIGURE , FZ_STRUCTURE_FORMULA ,
  FZ_STRUCTURE_FORM , FZ_STRUCTURE_ARTIFACT
}
enum  fz_metatext { FZ_METATEXT_ACTUALTEXT , FZ_METATEXT_ALT , FZ_METATEXT_ABBREVIATION , FZ_METATEXT_TITLE }
enum  { FZ_DONT_INTERPOLATE_IMAGES = 1 , FZ_NO_CACHE = 2 , FZ_DONT_DECODE_IMAGES = 4 , FZ_NO_TILING = 8 }
enum  { FZ_TEST_OPT_IMAGES = 1 , FZ_TEST_OPT_SHADINGS = 2 }

Functions

int fz_lookup_blendmode (const char *name)
const char * fz_blendmode_name (int blendmode)
fz_functionfz_new_function_of_size (fz_context *ctx, int size, size_t size2, int m, int n, fz_function_eval_fn *eval, fz_store_drop_fn *drop)
void fz_eval_function (fz_context *ctx, fz_function *func, const float *in, int inlen, float *out, int outlen)
fz_functionfz_keep_function (fz_context *ctx, fz_function *func)
void fz_drop_function (fz_context *ctx, fz_function *func)
size_t fz_function_size (fz_context *ctx, fz_function *func)
const char * fz_structure_to_string (fz_structure type)
fz_structure fz_structure_from_string (const char *str)
void fz_fill_path (fz_context *ctx, fz_device *dev, const fz_path *path, int even_odd, fz_matrix ctm, fz_colorspace *colorspace, const float *color, float alpha, fz_color_params color_params)
void fz_stroke_path (fz_context *ctx, fz_device *dev, const fz_path *path, const fz_stroke_state *stroke, fz_matrix ctm, fz_colorspace *colorspace, const float *color, float alpha, fz_color_params color_params)
void fz_clip_path (fz_context *ctx, fz_device *dev, const fz_path *path, int even_odd, fz_matrix ctm, fz_rect scissor)
void fz_clip_stroke_path (fz_context *ctx, fz_device *dev, const fz_path *path, const fz_stroke_state *stroke, fz_matrix ctm, fz_rect scissor)
void fz_fill_text (fz_context *ctx, fz_device *dev, const fz_text *text, fz_matrix ctm, fz_colorspace *colorspace, const float *color, float alpha, fz_color_params color_params)
void fz_stroke_text (fz_context *ctx, fz_device *dev, const fz_text *text, const fz_stroke_state *stroke, fz_matrix ctm, fz_colorspace *colorspace, const float *color, float alpha, fz_color_params color_params)
void fz_clip_text (fz_context *ctx, fz_device *dev, const fz_text *text, fz_matrix ctm, fz_rect scissor)
void fz_clip_stroke_text (fz_context *ctx, fz_device *dev, const fz_text *text, const fz_stroke_state *stroke, fz_matrix ctm, fz_rect scissor)
void fz_ignore_text (fz_context *ctx, fz_device *dev, const fz_text *text, fz_matrix ctm)
void fz_pop_clip (fz_context *ctx, fz_device *dev)
void fz_fill_shade (fz_context *ctx, fz_device *dev, fz_shade *shade, fz_matrix ctm, float alpha, fz_color_params color_params)
void fz_fill_image (fz_context *ctx, fz_device *dev, fz_image *image, fz_matrix ctm, float alpha, fz_color_params color_params)
void fz_fill_image_mask (fz_context *ctx, fz_device *dev, fz_image *image, fz_matrix ctm, fz_colorspace *colorspace, const float *color, float alpha, fz_color_params color_params)
void fz_clip_image_mask (fz_context *ctx, fz_device *dev, fz_image *image, fz_matrix ctm, fz_rect scissor)
void fz_begin_mask (fz_context *ctx, fz_device *dev, fz_rect area, int luminosity, fz_colorspace *colorspace, const float *bc, fz_color_params color_params)
void fz_end_mask (fz_context *ctx, fz_device *dev)
void fz_end_mask_tr (fz_context *ctx, fz_device *dev, fz_function *fn)
void fz_begin_group (fz_context *ctx, fz_device *dev, fz_rect area, fz_colorspace *cs, int isolated, int knockout, int blendmode, float alpha)
void fz_end_group (fz_context *ctx, fz_device *dev)
void fz_begin_tile (fz_context *ctx, fz_device *dev, fz_rect area, fz_rect view, float xstep, float ystep, fz_matrix ctm)
int fz_begin_tile_id (fz_context *ctx, fz_device *dev, fz_rect area, fz_rect view, float xstep, float ystep, fz_matrix ctm, int id)
int fz_begin_tile_tid (fz_context *ctx, fz_device *dev, fz_rect area, fz_rect view, float xstep, float ystep, fz_matrix ctm, int id, int doc_id)
void fz_end_tile (fz_context *ctx, fz_device *dev)
void fz_render_flags (fz_context *ctx, fz_device *dev, int set, int clear)
void fz_set_default_colorspaces (fz_context *ctx, fz_device *dev, fz_default_colorspaces *default_cs)
void fz_begin_layer (fz_context *ctx, fz_device *dev, const char *layer_name)
void fz_end_layer (fz_context *ctx, fz_device *dev)
void fz_begin_structure (fz_context *ctx, fz_device *dev, fz_structure standard, const char *raw, int idx)
void fz_end_structure (fz_context *ctx, fz_device *dev)
void fz_begin_metatext (fz_context *ctx, fz_device *dev, fz_metatext meta, const char *text)
void fz_end_metatext (fz_context *ctx, fz_device *dev)
fz_devicefz_new_device_of_size (fz_context *ctx, int size)
fz_devicefz_new_passthrough_device_of_size (fz_context *ctx, fz_device *passthrough, int size)
void fz_close_device (fz_context *ctx, fz_device *dev)
void fz_drop_device (fz_context *ctx, fz_device *dev)
fz_devicefz_keep_device (fz_context *ctx, fz_device *dev)
void fz_enable_device_hints (fz_context *ctx, fz_device *dev, int hints)
void fz_disable_device_hints (fz_context *ctx, fz_device *dev, int hints)
fz_rect fz_device_current_scissor (fz_context *ctx, fz_device *dev)
fz_devicefz_new_trace_device (fz_context *ctx, fz_output *out)
fz_devicefz_new_xmltext_device (fz_context *ctx, fz_output *out)
fz_devicefz_new_bbox_device (fz_context *ctx, fz_rect *rectp)
fz_devicefz_new_test_device (fz_context *ctx, int *is_color, float threshold, int options, fz_device *passthrough)
fz_devicefz_new_culling_device (fz_context *ctx, fz_device *passthrough, const fz_culling_options *opts)
fz_devicefz_new_culling_device_with_rects (fz_context *ctx, fz_device *passthrough, int n, const fz_rect *rects)
fz_devicefz_new_draw_device (fz_context *ctx, fz_matrix transform, fz_pixmap *dest)
fz_devicefz_new_draw_device_with_bbox (fz_context *ctx, fz_matrix transform, fz_pixmap *dest, const fz_irect *clip)
fz_devicefz_new_draw_device_with_proof (fz_context *ctx, fz_matrix transform, fz_pixmap *dest, fz_colorspace *proof_cs)
fz_devicefz_new_draw_device_with_bbox_proof (fz_context *ctx, fz_matrix transform, fz_pixmap *dest, const fz_irect *clip, fz_colorspace *cs)
fz_devicefz_new_draw_device_type3 (fz_context *ctx, fz_matrix transform, fz_pixmap *dest)
void fz_init_draw_options (fz_context *ctx, fz_draw_options *draw_options)
fz_draw_optionsfz_parse_draw_options (fz_context *ctx, fz_draw_options *draw_options, const char *string)
void fz_apply_draw_options (fz_context *ctx, fz_draw_options *draw_options, fz_options *options)
fz_devicefz_new_draw_device_with_options (fz_context *ctx, const fz_draw_options *options, fz_rect mediabox, fz_pixmap **pixmap)

Variables

FZ_DATA const char * fz_draw_options_usage

Macro Definition Documentation

◆ fz_new_derived_device

#define fz_new_derived_device ( CTX,
TYPE )
Value:
((TYPE *)Memento_label(fz_new_device_of_size(ctx,sizeof(TYPE)),#TYPE))
fz_device * fz_new_device_of_size(fz_context *ctx, int size)
#define Memento_label(A, B)
Definition memento.h:388

◆ fz_new_derived_function

#define fz_new_derived_function ( CTX,
TYPE,
SIZE,
M,
N,
EVAL,
DROP )
Value:
((TYPE*)Memento_label(fz_new_function_of_size(CTX,sizeof(TYPE),SIZE,M,N,EVAL,DROP), #TYPE))
fz_function * fz_new_function_of_size(fz_context *ctx, int size, size_t size2, int m, int n, fz_function_eval_fn *eval, fz_store_drop_fn *drop)

◆ fz_new_derived_passthrough_device

#define fz_new_derived_passthrough_device ( CTX,
PASSTHRU,
TYPE )
Value:
((TYPE *)Memento_label(fz_new_passthrough_device_of_size(ctx,PASSTHRU,sizeof(TYPE)),#TYPE))
fz_device * fz_new_passthrough_device_of_size(fz_context *ctx, fz_device *passthrough, int size)

Typedef Documentation

◆ fz_device

typedef struct fz_device fz_device

The different format handlers (pdf, xps etc) interpret pages to a device. These devices can then process the stream of calls they receive in various ways: The trace device outputs debugging information for the calls. The draw device will render them. The list device stores them in a list to play back later. The text device performs text extraction and searching. The bbox device calculates the bounding box for the page. Other devices can (and will) be written in the future.

◆ fz_function

typedef struct fz_function fz_function

◆ fz_function_eval_fn

typedef void fz_function_eval_fn(fz_context *, fz_function *, const float *, float *)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FZ_DONT_INTERPOLATE_IMAGES 
FZ_NO_CACHE 
FZ_DONT_DECODE_IMAGES 
FZ_NO_TILING 

◆ anonymous enum

anonymous enum
Enumerator
fz_device_container_stack_is_clip 
fz_device_container_stack_is_mask 
fz_device_container_stack_is_group 
fz_device_container_stack_is_tile 

◆ anonymous enum

anonymous enum
Enumerator
FZ_BLEND_NORMAL 
FZ_BLEND_MULTIPLY 
FZ_BLEND_SCREEN 
FZ_BLEND_OVERLAY 
FZ_BLEND_DARKEN 
FZ_BLEND_LIGHTEN 
FZ_BLEND_COLOR_DODGE 
FZ_BLEND_COLOR_BURN 
FZ_BLEND_HARD_LIGHT 
FZ_BLEND_SOFT_LIGHT 
FZ_BLEND_DIFFERENCE 
FZ_BLEND_EXCLUSION 
FZ_BLEND_HUE 
FZ_BLEND_SATURATION 
FZ_BLEND_COLOR 
FZ_BLEND_LUMINOSITY 
FZ_BLEND_MODEMASK 
FZ_BLEND_ISOLATED 
FZ_BLEND_KNOCKOUT 

◆ anonymous enum

anonymous enum
Enumerator
FZ_TEST_OPT_IMAGES 
FZ_TEST_OPT_SHADINGS 

◆ anonymous enum

anonymous enum
Enumerator
FZ_DEVFLAG_MASK 
FZ_DEVFLAG_COLOR 
FZ_DEVFLAG_UNCACHEABLE 
FZ_DEVFLAG_FILLCOLOR_UNDEFINED 
FZ_DEVFLAG_STROKECOLOR_UNDEFINED 
FZ_DEVFLAG_STARTCAP_UNDEFINED 
FZ_DEVFLAG_DASHCAP_UNDEFINED 
FZ_DEVFLAG_ENDCAP_UNDEFINED 
FZ_DEVFLAG_LINEJOIN_UNDEFINED 
FZ_DEVFLAG_MITERLIMIT_UNDEFINED 
FZ_DEVFLAG_LINEWIDTH_UNDEFINED 
FZ_DEVFLAG_BBOX_DEFINED 
FZ_DEVFLAG_GRIDFIT_AS_TILED 
FZ_DEVFLAG_DASH_PATTERN_UNDEFINED 

◆ anonymous enum

anonymous enum
Enumerator
FZ_FUNCTION_MAX_N 
FZ_FUNCTION_MAX_M 

◆ fz_metatext

Enumerator
FZ_METATEXT_ACTUALTEXT 
FZ_METATEXT_ALT 
FZ_METATEXT_ABBREVIATION 
FZ_METATEXT_TITLE 

◆ fz_structure

Enumerator
FZ_STRUCTURE_INVALID 
FZ_STRUCTURE_DOCUMENT 
FZ_STRUCTURE_PART 
FZ_STRUCTURE_ART 
FZ_STRUCTURE_SECT 
FZ_STRUCTURE_DIV 
FZ_STRUCTURE_BLOCKQUOTE 
FZ_STRUCTURE_CAPTION 
FZ_STRUCTURE_TOC 
FZ_STRUCTURE_TOCI 
FZ_STRUCTURE_INDEX 
FZ_STRUCTURE_NONSTRUCT 
FZ_STRUCTURE_PRIVATE 
FZ_STRUCTURE_DOCUMENTFRAGMENT 
FZ_STRUCTURE_ASIDE 
FZ_STRUCTURE_TITLE 
FZ_STRUCTURE_FENOTE 
FZ_STRUCTURE_SUB 
FZ_STRUCTURE_P 
FZ_STRUCTURE_H 
FZ_STRUCTURE_H1 
FZ_STRUCTURE_H2 
FZ_STRUCTURE_H3 
FZ_STRUCTURE_H4 
FZ_STRUCTURE_H5 
FZ_STRUCTURE_H6 
FZ_STRUCTURE_LIST 
FZ_STRUCTURE_LISTITEM 
FZ_STRUCTURE_LABEL 
FZ_STRUCTURE_LISTBODY 
FZ_STRUCTURE_TABLE 
FZ_STRUCTURE_TR 
FZ_STRUCTURE_TH 
FZ_STRUCTURE_TD 
FZ_STRUCTURE_THEAD 
FZ_STRUCTURE_TBODY 
FZ_STRUCTURE_TFOOT 
FZ_STRUCTURE_SPAN 
FZ_STRUCTURE_QUOTE 
FZ_STRUCTURE_NOTE 
FZ_STRUCTURE_REFERENCE 
FZ_STRUCTURE_BIBENTRY 
FZ_STRUCTURE_CODE 
FZ_STRUCTURE_LINK 
FZ_STRUCTURE_ANNOT 
FZ_STRUCTURE_EM 
FZ_STRUCTURE_STRONG 
FZ_STRUCTURE_RUBY 
FZ_STRUCTURE_RB 
FZ_STRUCTURE_RT 
FZ_STRUCTURE_RP 
FZ_STRUCTURE_WARICHU 
FZ_STRUCTURE_WT 
FZ_STRUCTURE_WP 
FZ_STRUCTURE_FIGURE 
FZ_STRUCTURE_FORMULA 
FZ_STRUCTURE_FORM 
FZ_STRUCTURE_ARTIFACT 

Function Documentation

◆ fz_apply_draw_options()

void fz_apply_draw_options ( fz_context * ctx,
fz_draw_options * draw_options,
fz_options * options )

Parse draw device options from an fz_options structure.

This assumes that the draw_options struct has been initialised already.

◆ fz_begin_group()

void fz_begin_group ( fz_context * ctx,
fz_device * dev,
fz_rect area,
fz_colorspace * cs,
int isolated,
int knockout,
int blendmode,
float alpha )

◆ fz_begin_layer()

void fz_begin_layer ( fz_context * ctx,
fz_device * dev,
const char * layer_name )

◆ fz_begin_mask()

void fz_begin_mask ( fz_context * ctx,
fz_device * dev,
fz_rect area,
int luminosity,
fz_colorspace * colorspace,
const float * bc,
fz_color_params color_params )

◆ fz_begin_metatext()

void fz_begin_metatext ( fz_context * ctx,
fz_device * dev,
fz_metatext meta,
const char * text )

◆ fz_begin_structure()

void fz_begin_structure ( fz_context * ctx,
fz_device * dev,
fz_structure standard,
const char * raw,
int idx )

◆ fz_begin_tile()

void fz_begin_tile ( fz_context * ctx,
fz_device * dev,
fz_rect area,
fz_rect view,
float xstep,
float ystep,
fz_matrix ctm )

◆ fz_begin_tile_id()

int fz_begin_tile_id ( fz_context * ctx,
fz_device * dev,
fz_rect area,
fz_rect view,
float xstep,
float ystep,
fz_matrix ctm,
int id )

◆ fz_begin_tile_tid()

int fz_begin_tile_tid ( fz_context * ctx,
fz_device * dev,
fz_rect area,
fz_rect view,
float xstep,
float ystep,
fz_matrix ctm,
int id,
int doc_id )

◆ fz_blendmode_name()

const char * fz_blendmode_name ( int blendmode)

Map from enumeration to blend mode string.

The string is static, with arbitrary lifespan.

◆ fz_clip_image_mask()

void fz_clip_image_mask ( fz_context * ctx,
fz_device * dev,
fz_image * image,
fz_matrix ctm,
fz_rect scissor )

◆ fz_clip_path()

void fz_clip_path ( fz_context * ctx,
fz_device * dev,
const fz_path * path,
int even_odd,
fz_matrix ctm,
fz_rect scissor )

◆ fz_clip_stroke_path()

void fz_clip_stroke_path ( fz_context * ctx,
fz_device * dev,
const fz_path * path,
const fz_stroke_state * stroke,
fz_matrix ctm,
fz_rect scissor )

◆ fz_clip_stroke_text()

void fz_clip_stroke_text ( fz_context * ctx,
fz_device * dev,
const fz_text * text,
const fz_stroke_state * stroke,
fz_matrix ctm,
fz_rect scissor )

◆ fz_clip_text()

void fz_clip_text ( fz_context * ctx,
fz_device * dev,
const fz_text * text,
fz_matrix ctm,
fz_rect scissor )

◆ fz_close_device()

void fz_close_device ( fz_context * ctx,
fz_device * dev )

Signal the end of input, and flush any buffered output. This is NOT called implicitly on fz_drop_device. This may throw exceptions.

◆ fz_device_current_scissor()

fz_rect fz_device_current_scissor ( fz_context * ctx,
fz_device * dev )

Find current scissor region as tracked by the device.

◆ fz_disable_device_hints()

void fz_disable_device_hints ( fz_context * ctx,
fz_device * dev,
int hints )

Disable (clear) hint bits within the hint bitfield for a device.

◆ fz_drop_device()

void fz_drop_device ( fz_context * ctx,
fz_device * dev )

Reduce the reference count on a device. When the reference count reaches zero, the device and its resources will be freed. Don't forget to call fz_close_device before dropping the device, or you may get incomplete output!

Never throws exceptions.

◆ fz_drop_function()

void fz_drop_function ( fz_context * ctx,
fz_function * func )

◆ fz_enable_device_hints()

void fz_enable_device_hints ( fz_context * ctx,
fz_device * dev,
int hints )

Enable (set) hint bits within the hint bitfield for a device.

◆ fz_end_group()

void fz_end_group ( fz_context * ctx,
fz_device * dev )

◆ fz_end_layer()

void fz_end_layer ( fz_context * ctx,
fz_device * dev )

◆ fz_end_mask()

void fz_end_mask ( fz_context * ctx,
fz_device * dev )

◆ fz_end_mask_tr()

void fz_end_mask_tr ( fz_context * ctx,
fz_device * dev,
fz_function * fn )

◆ fz_end_metatext()

void fz_end_metatext ( fz_context * ctx,
fz_device * dev )

◆ fz_end_structure()

void fz_end_structure ( fz_context * ctx,
fz_device * dev )

◆ fz_end_tile()

void fz_end_tile ( fz_context * ctx,
fz_device * dev )

◆ fz_eval_function()

void fz_eval_function ( fz_context * ctx,
fz_function * func,
const float * in,
int inlen,
float * out,
int outlen )

◆ fz_fill_image()

void fz_fill_image ( fz_context * ctx,
fz_device * dev,
fz_image * image,
fz_matrix ctm,
float alpha,
fz_color_params color_params )

◆ fz_fill_image_mask()

void fz_fill_image_mask ( fz_context * ctx,
fz_device * dev,
fz_image * image,
fz_matrix ctm,
fz_colorspace * colorspace,
const float * color,
float alpha,
fz_color_params color_params )

◆ fz_fill_path()

void fz_fill_path ( fz_context * ctx,
fz_device * dev,
const fz_path * path,
int even_odd,
fz_matrix ctm,
fz_colorspace * colorspace,
const float * color,
float alpha,
fz_color_params color_params )

Device calls; graphics primitives and containers.

◆ fz_fill_shade()

void fz_fill_shade ( fz_context * ctx,
fz_device * dev,
fz_shade * shade,
fz_matrix ctm,
float alpha,
fz_color_params color_params )

◆ fz_fill_text()

void fz_fill_text ( fz_context * ctx,
fz_device * dev,
const fz_text * text,
fz_matrix ctm,
fz_colorspace * colorspace,
const float * color,
float alpha,
fz_color_params color_params )

◆ fz_function_size()

size_t fz_function_size ( fz_context * ctx,
fz_function * func )

◆ fz_ignore_text()

void fz_ignore_text ( fz_context * ctx,
fz_device * dev,
const fz_text * text,
fz_matrix ctm )

◆ fz_init_draw_options()

void fz_init_draw_options ( fz_context * ctx,
fz_draw_options * draw_options )

Initialise a draw_options struct to sensible values.

◆ fz_keep_device()

fz_device * fz_keep_device ( fz_context * ctx,
fz_device * dev )

Increment the reference count for a device. Returns the same pointer.

Never throws exceptions.

◆ fz_keep_function()

fz_function * fz_keep_function ( fz_context * ctx,
fz_function * func )

◆ fz_lookup_blendmode()

int fz_lookup_blendmode ( const char * name)

Map from (case sensitive) blend mode string to enumeration.

◆ fz_new_bbox_device()

fz_device * fz_new_bbox_device ( fz_context * ctx,
fz_rect * rectp )

Create a device to compute the bounding box of all marks on a page.

The returned bounding box will be the union of all bounding boxes of all objects on a page.

◆ fz_new_culling_device()

fz_device * fz_new_culling_device ( fz_context * ctx,
fz_device * passthrough,
const fz_culling_options * opts )

Create an 'cull' device.

This device passes through all calls to the 'passthrough' device, except for text operations that may be culled.

The decision as to whether to cull a glyph or not is made by calling the 'cull_glyph' function in the options structure with the rectangle that would be affected. If the function returns 0, the glyph is passed through. if the function returns 1, the glyph is dropped. All other values reserved.

◆ fz_new_culling_device_with_rects()

fz_device * fz_new_culling_device_with_rects ( fz_context * ctx,
fz_device * passthrough,
int n,
const fz_rect * rects )

Create an culling device that will drop any glyphs that significantly overlap any of the given list of rects.

The rect list is copied into the device, so does not need to exist beyond this call.

◆ fz_new_device_of_size()

fz_device * fz_new_device_of_size ( fz_context * ctx,
int size )

Devices are created by calls to device implementations, for instance: foo_new_device(). These will be implemented by calling fz_new_derived_device(ctx, foo_device) where foo_device is a structure "derived from" fz_device, for instance typedef struct { fz_device base; ...extras...} foo_device;

◆ fz_new_draw_device()

fz_device * fz_new_draw_device ( fz_context * ctx,
fz_matrix transform,
fz_pixmap * dest )

Create a device to draw on a pixmap.

dest: Target pixmap for the draw device. See fz_new_pixmap* for how to obtain a pixmap. The pixmap is not cleared by the draw device, see fz_clear_pixmap* for how to clear it prior to calling fz_new_draw_device. Free the device by calling fz_drop_device.

transform: Transform from user space in points to device space in pixels.

◆ fz_new_draw_device_type3()

fz_device * fz_new_draw_device_type3 ( fz_context * ctx,
fz_matrix transform,
fz_pixmap * dest )

◆ fz_new_draw_device_with_bbox()

fz_device * fz_new_draw_device_with_bbox ( fz_context * ctx,
fz_matrix transform,
fz_pixmap * dest,
const fz_irect * clip )

Create a device to draw on a pixmap.

dest: Target pixmap for the draw device. See fz_new_pixmap* for how to obtain a pixmap. The pixmap is not cleared by the draw device, see fz_clear_pixmap* for how to clear it prior to calling fz_new_draw_device. Free the device by calling fz_drop_device.

transform: Transform from user space in points to device space in pixels.

clip: Bounding box to restrict any marking operations of the draw device.

◆ fz_new_draw_device_with_bbox_proof()

fz_device * fz_new_draw_device_with_bbox_proof ( fz_context * ctx,
fz_matrix transform,
fz_pixmap * dest,
const fz_irect * clip,
fz_colorspace * cs )

Create a device to draw on a pixmap.

dest: Target pixmap for the draw device. See fz_new_pixmap* for how to obtain a pixmap. The pixmap is not cleared by the draw device, see fz_clear_pixmap* for how to clear it prior to calling fz_new_draw_device. Free the device by calling fz_drop_device.

transform: Transform from user space in points to device space in pixels.

clip: Bounding box to restrict any marking operations of the draw device.

proof_cs: Color space to render to prior to mapping to color space defined by pixmap.

◆ fz_new_draw_device_with_options()

fz_device * fz_new_draw_device_with_options ( fz_context * ctx,
const fz_draw_options * options,
fz_rect mediabox,
fz_pixmap ** pixmap )

Create a new pixmap and draw device, using the specified options.

options: Options to configure the draw device, and choose the resolution and colorspace.

mediabox: The bounds of the page in points.

pixmap: An out parameter containing the newly created pixmap.

◆ fz_new_draw_device_with_proof()

fz_device * fz_new_draw_device_with_proof ( fz_context * ctx,
fz_matrix transform,
fz_pixmap * dest,
fz_colorspace * proof_cs )

Create a device to draw on a pixmap.

dest: Target pixmap for the draw device. See fz_new_pixmap* for how to obtain a pixmap. The pixmap is not cleared by the draw device, see fz_clear_pixmap* for how to clear it prior to calling fz_new_draw_device. Free the device by calling fz_drop_device.

transform: Transform from user space in points to device space in pixels.

proof_cs: Intermediate color space to map though when mapping to color space defined by pixmap.

◆ fz_new_function_of_size()

fz_function * fz_new_function_of_size ( fz_context * ctx,
int size,
size_t size2,
int m,
int n,
fz_function_eval_fn * eval,
fz_store_drop_fn * drop )

◆ fz_new_passthrough_device_of_size()

fz_device * fz_new_passthrough_device_of_size ( fz_context * ctx,
fz_device * passthrough,
int size )

Create a passthrough device.

The device is created with stub functions that do nothing except pass calls through to the given sub device. This includes close and drop!

The caller of this function can then override any functions it wants to handle itself.

◆ fz_new_test_device()

fz_device * fz_new_test_device ( fz_context * ctx,
int * is_color,
float threshold,
int options,
fz_device * passthrough )

Create a device to test for features.

Currently only tests for the presence of non-grayscale colors.

is_color: Possible values returned: 0: Definitely greyscale 1: Probably color (all colors were grey, but there were images or shadings in a non grey colorspace). 2: Definitely color

threshold: The difference from grayscale that will be tolerated. Typical values to use are either 0 (be exact) and 0.02 (allow an imperceptible amount of slop).

options: A set of bitfield options, from the FZ_TEST_OPT set.

passthrough: A device to pass all calls through to, or NULL. If set, then the test device can both test and pass through to an underlying device (like, say, the display list device). This means that a display list can be created and at the end we'll know if it's colored or not.

In the absence of a passthrough device, the device will throw an exception to stop page interpretation when color is found.

◆ fz_new_trace_device()

fz_device * fz_new_trace_device ( fz_context * ctx,
fz_output * out )

Create a device to print a debug trace of all device calls.

◆ fz_new_xmltext_device()

fz_device * fz_new_xmltext_device ( fz_context * ctx,
fz_output * out )

Create a device to output raw information.

◆ fz_parse_draw_options()

fz_draw_options * fz_parse_draw_options ( fz_context * ctx,
fz_draw_options * draw_options,
const char * string )

Parse draw device options from a comma separated key-value string.

This initialises the draw_options struct first.

◆ fz_pop_clip()

void fz_pop_clip ( fz_context * ctx,
fz_device * dev )

◆ fz_render_flags()

void fz_render_flags ( fz_context * ctx,
fz_device * dev,
int set,
int clear )

◆ fz_set_default_colorspaces()

void fz_set_default_colorspaces ( fz_context * ctx,
fz_device * dev,
fz_default_colorspaces * default_cs )

◆ fz_stroke_path()

void fz_stroke_path ( fz_context * ctx,
fz_device * dev,
const fz_path * path,
const fz_stroke_state * stroke,
fz_matrix ctm,
fz_colorspace * colorspace,
const float * color,
float alpha,
fz_color_params color_params )

◆ fz_stroke_text()

void fz_stroke_text ( fz_context * ctx,
fz_device * dev,
const fz_text * text,
const fz_stroke_state * stroke,
fz_matrix ctm,
fz_colorspace * colorspace,
const float * color,
float alpha,
fz_color_params color_params )

◆ fz_structure_from_string()

fz_structure fz_structure_from_string ( const char * str)

◆ fz_structure_to_string()

const char * fz_structure_to_string ( fz_structure type)

Variable Documentation

◆ fz_draw_options_usage

FZ_DATA const char* fz_draw_options_usage
extern