00001 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 #ifndef INC_RVC_OFONT_H 00042 #define INC_RVC_OFONT_H 00043 00044 #ifndef INC_RVC_OBJECT_H 00045 #include <rvc/object.h> 00046 #endif 00047 00048 #ifndef INC_MI32_POINT_H 00049 #include <mi32/point.h> 00050 #endif 00051 00052 struct RVCOFONTCHAR { 00053 WPOINT2D basepoint; 00054 WPOINT2D minval; 00055 WPOINT2D maxval; 00056 INT16 kerning; 00057 UINT16 segments; 00058 UINT16 ascii; 00059 UINT8 spare[6]; 00060 }; /* makes 24 bytes total */ 00061 00062 struct RVCOFONTCHARSEG { 00063 UINT16 numpoints; 00064 UINT8 type; 00065 UINT8 subtype; 00066 UINT8 spare[4]; 00067 }; 00068 00070 #define OF_NORMAL 0 00071 #define OF_MULTI 1 /* Multiple segments follow, read numpoints of them 00072 and fill resulting shape. EXAMPLE: (numpoints == 3) 00073 line seg, then b-spline, then a line, 00074 then fill entire shape */ 00075 00077 #define OF_NORMAL 0 00078 #define OF_STROKE 1 00079 #define OF_BSPLINE 2 00080 00081 /* Do not mess with this structure: MOTU */ 00082 struct OFONTCHARCTRLPT { 00083 INT16 x,y; 00084 UINT16 type; 00085 UINT16 spare; 00086 }; 00087 00089 #define OF_ONE 0 00090 #define OF_TWO 1 00091 #define OF_THREE 2 00092 00093 namespace RVC { 00094 //Forward Declarations 00095 class OFONTHANDLE; 00096 struct OFONTINFO; 00097 00098 class OFONT : public RVC::OBJECT { 00099 public: 00100 00102 OFONT ( 00103 ); 00104 00106 OFONT ( 00107 const RVC::OFONT& obj 00108 ); 00109 00111 virtual ~OFONT ( 00112 ); 00113 00115 RVC::OFONT& operator= ( 00116 const RVC::OFONT& rhs 00117 ); 00118 00119 INT32 GetAscent ( 00120 ) const; 00121 00122 INT32 GetDescent ( 00123 ) const; 00124 00125 INT32 GetInitChar ( 00126 ) const; 00127 00128 INT32 GetLastChar ( 00129 ) const; 00130 00131 INT32 GetLeading ( 00132 ) const; 00133 00134 INT32 GetMaxGlyphSize ( 00135 ) const; 00136 00137 INT32 GetNumGlyphs ( 00138 ) const; 00139 00142 INT32 ReadCharacter ( 00143 INT32 item, 00144 void *ptr 00145 ); 00146 00147 private: 00148 #ifndef GENERATING_DOXYGEN_OUTPUT 00149 00151 virtual ERRVALUE v_CloseObject (); 00152 virtual OBJTYPE v_GetDftObjectType () const; 00153 virtual bool v_IsObjectOpen () const; 00154 virtual ERRVALUE v_OpenObject (OPENMODE OpenFlags, MDLGPARENT parent, const CREDENTIALS* Credentials); 00155 virtual bool v_ValidateObjectType (const OBJTYPE otype) const; 00156 00157 OFONTHANDLE* m_OFontHandle; 00158 OFONTINFO* m_OFontInfo; 00159 #endif // GENERATING_DOXYGEN_OUTPUT 00160 }; 00161 00162 } 00163 00164 #endif
1.6.1