#ifndef _TEXT_FLAGS_H_1c9ba079_ #define _TEXT_FLAGS_H_1c9ba079_ #define TEXTFLAG_RECTBG 0x00000001 #define TEXTFLAG_XF 0x0000000e #define TEXTFLAG_XF_NONE 0x00000000 #define TEXTFLAG_XF_FLIP_X 0x00000002 #define TEXTFLAG_XF_FLIP_Y 0x00000004 #define TEXTFLAG_XF_ROT180 0x00000006 #define TEXTFLAG_XF_FLIP_XY 0x00000008 #define TEXTFLAG_XF_ROT_CCW 0x0000000a #define TEXTFLAG_XF_ROT_CW 0x0000000c #define TEXTFLAG_XF_FLIP_XMY 0x0000000e #define TEXTFLAG_JUST 0x00000030 #define TEXTFLAG_JUST_L 0x00000010 #define TEXTFLAG_JUST_C 0x00000020 #define TEXTFLAG_JUST_R 0x00000030 #define TEXTFLAG_X 0x000000c0 #define TEXTFLAG_X_L 0x00000040 #define TEXTFLAG_X_C 0x00000080 #define TEXTFLAG_X_R 0x000000c0 #define TEXTFLAG_Y 0x00000700 #define TEXTFLAG_Y_TOP 0x00000100 #define TEXTFLAG_Y_CENTRE 0x00000200 #define TEXTFLAG_Y_BOTTOM 0x00000300 #define TEXTFLAG_Y_BASE_FIRST 0x00000400 #define TEXTFLAG_Y_BASE_LAST 0x00000500 #define TEXTFLAG_Y_CENTREBASE 0x00000600 #define TEXTFLAG_BBOXMARGIN 0x00000800 #define TEXTFLAG_NO_AUTO_SWAP 0x00001000 /* * Compose two transforms, returning the transform that's equivalent to * applying first the first argument then the second argument. * * Masks off all but TEXTFLAG_XF bits in each argument. */ extern unsigned int textflag_xf_compose(unsigned int, unsigned int); /* * Returns the inverse of a transform, the transform that, when * composed with the input (in either order) returns the null * transformation. * * Masks off all but TEXTFLAG_XF bits in its argument. */ extern unsigned int textflag_xf_invert(unsigned int); /* * textflag_xf_x and _y implement transformations. Given an input * image sx by sy, a point (ix,iy) in it, and a transform xf, the X * coordinate of that point in the transformed image is * textflag_xf_x(xf,ix,iy,sx,sy) and the Y coordinate is ..._y(...). * (ix and iy are allowed to be <0 or >sx/sy.) * The size of the transformed image is textflag_xf_sx(xf,sx,sy) by * textflag_xf_sy(xf,sx,sy). * * All these functions mask off all but the TEXTFLAG_XF bits in their * transform argument. */ extern unsigned int textflag_xf_sx(unsigned int, unsigned int, unsigned int); extern unsigned int textflag_xf_sy(unsigned int, unsigned int, unsigned int); extern int textflag_xf_x(unsigned int, int, int, unsigned int, unsigned int); extern int textflag_xf_y(unsigned int, int, int, unsigned int, unsigned int); #endif