📄 speedo.h
字号:
/* Bit 6: Import set width if set */ /* Bit 7: not used */ /* Bit 8: Squeeze left if set */ /* Bit 9: Squeeze right if set */ /* Bit 10: Squeeze top if set */ /* Bit 11: Squeeze bottom if set */ /* Bit 12: Clip left if set */ /* Bit 13: Clip right if set */ /* Bit 14: Clip top if set */ /* Bit 15: Clip bottom if set */ /* Bits 16-31 not used */#ifdef __STDC__ void *out_info; /* information for output module */#else char *out_info;#endif }specs_t; /* Specs structure for fw_set_specs */typedef struct tcb_tag { fix15 xxmult; /* Linear coeff of Xorus to compute Xpix */ fix15 xymult; /* Linear coeff of Yorus to compute Xpix */ fix31 xoffset; /* Linear constant to compute Xpix */ fix15 yxmult; /* Linear coeff of Xorus to compute Ypix */ fix15 yymult; /* Linear coeff of Yorus to compute Ypix */ fix31 yoffset; /* Linear constant to compute Ypix */ fix15 xppo; /* Pixels per oru in X dimension of char */ fix15 yppo; /* Pixels per oru in Y dimension of char */ fix15 xpos; /* Origin in X dimension of character */ fix15 ypos; /* Origin in Y dimension of character */ ufix16 xtype; /* Transformation type for X oru coords */ ufix16 ytype; /* Transformation type for Y oru coords */ ufix16 xmode; /* Transformation mode for X oru coords */ ufix16 ymode; /* Transformation mode for Y oru coords */ fix15 mirror; /* Transformation creates mirror image */ }tcb_t; /* Transformation control block */typedef struct point_tag { fix15 x; /* X coord of point (shifted pixels) */ fix15 y; /* Y coord of point (shifted pixels) */ }point_t; /* Point in device space */typedef struct band_tag { fix15 band_max; fix15 band_min; fix15 band_array_offset; fix15 band_floor; fix15 band_ceiling; } band_t;typedef struct bbox_tag { fix31 xmin; fix31 xmax; fix31 ymin; fix31 ymax; } bbox_t;#if SHORT_LISTS #define MAX_INTERCEPTS 256 /* Max storage for intercepts */typedef ufix8 cdr_t; /* 8 bit links in intercept chains */#else#define MAX_INTERCEPTS 1000 /* Max storage for intercepts */typedef ufix16 cdr_t; /* 16 bit links in intercept chains */#endif#if REENTRANT_ALLOCtypedef struct intercepts_tag { fix15 car[MAX_INTERCEPTS]; fix15 cdr[MAX_INTERCEPTS];#if INCL_SCREEN ufix8 inttype[MAX_INTERCEPTS]; ufix8 leftedge; ufix16 fracpix;#endif } intercepts_t;typedef struct plaid_tag { fix15 orus[MAX_CTRL_ZONES]; /* Controlled coordinate table (orus) */#if INCL_RULES fix15 pix[MAX_CTRL_ZONES]; /* Controlled coordinate table (sub-pixels) */ fix15 mult[MAX_INT_ZONES]; /* Interpolation multiplier table */ fix31 offset[MAX_INT_ZONES]; /* Interpolation offset table */#endif } plaid_t;#endif#if INCL_MULTIDEV#if PROTOS_AVAILtypedef struct bitmap_tag { void (*p_open_bitmap)(PROTO_DECL2 fix31 x_set_width, fix31 y_set_width, fix31 xorg, fix31 yorg, fix15 xsize,fix15 ysize); void (*p_set_bits)(PROTO_DECL2 fix15 y, fix15 xbit1, fix15 xbit2); void (*p_close_bitmap)(PROTO_DECL1); } bitmap_t;typedef struct outline_tag { void (*p_open_outline)(PROTO_DECL2 fix31 x_set_width, fix31 y_set_width, fix31 xmin, fix31 xmax, fix31 ymin,fix31 ymax); void (*p_start_char)(PROTO_DECL1); void (*p_start_contour)(PROTO_DECL2 fix31 x,fix31 y,boolean outside); void (*p_curve)(PROTO_DECL2 fix31 x1, fix31 y1, fix31 x2, fix31 y2, fix31 x3, fix31 y3); void (*p_line)(PROTO_DECL2 fix31 x, fix31 y); void (*p_close_contour)(PROTO_DECL1); void (*p_close_outline)(PROTO_DECL1); } outline_t;#elsetypedef struct bitmap_tag { void (*p_open_bitmap)(); void (*p_set_bits)(); void (*p_close_bitmap)(); } bitmap_t;typedef struct outline_tag { void (*p_open_outline)(); void (*p_start_char)(); void (*p_start_contour)(); void (*p_curve)(); void (*p_line)(); void (*p_close_contour)(); void (*p_close_outline)(); } outline_t;#endif#endif/* ---------------------------------------------------*//**** MAIN GLOBAL DATA STRUCTURE, SPEEDO_GLOBALS *****/typedef struct speedo_global_data {/* do_char.c data definitions */#if INCL_METRICS /* Metrics functions supported? */ kern_t kern; /* Kerning control block */#endif /* endif incl_metrics */ point_t Psw; /* End of escapement vector (1/65536 pixel units) */#if INCL_LCD /* Dynamic load character data supported? */ fix15 cb_offset; /* Offset to sub-char data in char buffer */#endif /* endif incl_lcd *//* do_trns.c data definitions */ point_t P0; /* Current point (sub-pixels) */ fix15 x_orus; /* Current X argument (orus) */ fix15 y_orus; /* Current Y argument (orus) */ fix15 x_pix; /* Current X argument (sub-pixels) */ fix15 y_pix; /* Current Y argument (sub-pixels) */ ufix8 x_int; /* Current X interpolation zone */ ufix8 y_int; /* Current Y interpolation zone */#if INCL_MULTIDEV && INCL_OUTLINE outline_t outline_device; boolean outline_device_set;#endif#if INCL_BLACK || INCL_SCREEN || INCL_2D#if INCL_MULTIDEV bitmap_t bitmap_device; boolean bitmap_device_set;#endif band_t y_band; /* Y current band(whole pixels) */ struct set_width_tag { fix31 x; fix31 y; } set_width; /* Character escapement vector */ boolean first_pass; /* TRUE during first pass thru outline data */ boolean extents_running; /* T if extent accumulation for each vector */ fix15 x0_spxl; /* X coord of current point (sub pixels) */ fix15 y0_spxl; /* Y coord of current point (sub pixels) */ fix15 y_pxl; /* Y coord of current point (whole pixels) */#if REENTRANT_ALLOC intercepts_t STACKFAR *intercepts;#else /* else if not reentrant */ fix15 car[MAX_INTERCEPTS]; /* Data field of intercept storage */ cdr_t cdr[MAX_INTERCEPTS]; /* Link field of intercept storage */#if INCL_SCREEN ufix8 inttype[MAX_INTERCEPTS]; ufix8 leftedge; ufix16 fracpix;#endif /* endif incl_screen */#endif /* endif reentrant */ fix15 bmap_xmin; /* Min X value (sub-pixel units) */ fix15 bmap_xmax; /* Max X value (sub-pixel units) */ fix15 bmap_ymin; /* Min Y value (sub-pixel units) */ fix15 bmap_ymax; /* Max Y value (sub-pixel units) */ fix15 no_y_lists; /* Number of active intercept lists */ fix15 first_offset; /* Index of first active list cell */ fix15 next_offset; /* Index of next free list cell */ boolean intercept_oflo; /* TRUE if intercepts data lost */#endif /* endif incl_black, incl_screen, incl_2d *//* bounding box now used by all output modules, including outline */ fix15 xmin; /* Min X value in whole character */ fix15 xmax; /* Max X value in whole character */ fix15 ymin; /* Min Y value in whole character */ fix15 ymax; /* Max Y value in whole character */#if INCL_2D fix15 no_x_lists; /* Number of active x intercept lists */ band_t x_band; /* X current band(whole pixels) */ boolean x_scan_active; /* X scan flag during scan conversion */#endif/* reset.c data definitions */ ufix16 key32; /* Decryption keys 3,2 combined */ ufix8 key4; /* Decryption key 4 */ ufix8 key6; /* Decryption key 6 */ ufix8 key7; /* Decryption key 7 */ ufix8 key8; /* Decryption key 8 *//* set_spcs.c data definitions */ buff_t font; buff_t GLOBALFAR *pfont; /* Pointer to font buffer structure */ fix31 font_buff_size; /* Number of bytes loaded in font buffer */ ufix8 FONTFAR *pchar_dir; /* Pointer to character directory */ fix15 first_char_idx; /* Index to first character in font */ fix15 no_chars_avail; /* Total characters in font layout */ fix15 orus_per_em; /* Outline resolution */ fix15 metric_resolution; /* metric resolution for setwidths, kerning pairs (defaults to orus_per_em) */ tcb_t tcb0; /* Top level transformation control block */ boolean specs_valid; /* TRUE if fw_set_specs() successful */ fix15 depth_adj; /* Curve splitting depth adjustment */ boolean curves_out; /* Allow curves to output module */ fix15 output_mode; /* Output module selector */ fix15 thresh; /* Scan conversion threshold (sub-pixels) */ boolean normal; /* TRUE if 0 obl and mult of 90 deg rot */ fix15 multshift; /* Fixed point shift for multipliers */ fix15 pixshift; /* Fixed point shift for sub-pixels */ fix15 poshift; /* Left shift from pixel to output format */ fix15 mpshift; /* Fixed point shift for mult to sub-pixels */ fix31 multrnd; /* 0.5 in multiplier units */ fix15 pixrnd; /* 0.5 in sub-pixel units */ fix31 mprnd; /* 0.5 sub-pixels in multiplier units */ fix15 pixfix; /* Mask to remove fractional pixels */ fix15 onepix; /* 1.0 pixels in sub-pixel units */#if PROTOS_AVAIL boolean (*init_out)(PROTO_DECL2 specs_t GLOBALFAR *specsarg); boolean (*begin_char)(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); void (*begin_sub_char)(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax); void (*begin_contour)(PROTO_DECL2 point_t P1,boolean outside); void (*curve)(PROTO_DECL2 point_t P1, point_t P2, point_t P3, fix15 depth); void (*line)(PROTO_DECL2 point_t P1); void (*end_contour)(PROTO_DECL1); void (*end_sub_char)(PROTO_DECL1); boolean (*end_char)(PROTO_DECL1); #else /* if not protos */ boolean (*init_out)(); boolean (*begin_char)(); void (*begin_sub_char)(); void (*begin_contour)(); void (*curve)(); void (*line)(); void (*end_contour)(); void (*end_sub_char)();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -