gx_utility.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. /**************************************************************************/
  2. /* */
  3. /* Copyright (c) Microsoft Corporation. All rights reserved. */
  4. /* */
  5. /* This software is licensed under the Microsoft Software License */
  6. /* Terms for Microsoft Azure RTOS. Full text of the license can be */
  7. /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
  8. /* and in the root directory of this software. */
  9. /* */
  10. /**************************************************************************/
  11. /**************************************************************************/
  12. /**************************************************************************/
  13. /** */
  14. /** GUIX Component */
  15. /** */
  16. /** Utility (Utility) */
  17. /** */
  18. /**************************************************************************/
  19. /**************************************************************************/
  20. /**************************************************************************/
  21. /* */
  22. /* COMPONENT DEFINITION RELEASE */
  23. /* */
  24. /* gx_utility.h PORTABLE C */
  25. /* 6.0.1 */
  26. /* AUTHOR */
  27. /* */
  28. /* Kenneth Maxwell, Microsoft Corporation */
  29. /* */
  30. /* DESCRIPTION */
  31. /* */
  32. /* This file defines the GUIX utility component, */
  33. /* including all data types and external references. It is assumed */
  34. /* that gx_api.h and gx_port.h have already been included. */
  35. /* */
  36. /* RELEASE HISTORY */
  37. /* */
  38. /* DATE NAME DESCRIPTION */
  39. /* */
  40. /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
  41. /* 06-30-2020 Kenneth Maxwell Modified comment(s), */
  42. /* added new prototype, */
  43. /* resulting in version 6.0.1 */
  44. /* */
  45. /**************************************************************************/
  46. #ifndef GX_UTILITY_H
  47. #define GX_UTILITY_H
  48. #if defined(GX_DYNAMIC_BIDI_TEXT_SUPPORT)
  49. /* Define bidi character types. */
  50. #define GX_BIDI_CHARACTER_TYPE_L 0x01 /* Left to Right */
  51. #define GX_BIDI_CHARACTER_TYPE_R 0x02 /* Right to Left */
  52. #define GX_BIDI_CHARACTER_TYPE_AL 0x03 /* Right to Left Arabic */
  53. #define GX_BIDI_CHARACTER_TYPE_EN 0x04 /* European Number */
  54. #define GX_BIDI_CHARACTER_TYPE_ES 0x05 /* European Number Separator */
  55. #define GX_BIDI_CHARACTER_TYPE_ET 0x06 /* European Number Terminator */
  56. #define GX_BIDI_CHARACTER_TYPE_AN 0x07 /* Arabic Number */
  57. #define GX_BIDI_CHARACTER_TYPE_CS 0x08 /* Common Number Separator */
  58. #define GX_BIDI_CHARACTER_TYPE_NSM 0x09 /* Nonspacing Mark */
  59. #define GX_BIDI_CHARACTER_TYPE_BN 0x0A /* Boundary Neutral */
  60. #define GX_BIDI_CHARACTER_TYPE_B 0x0B /* Paragraph Separator */
  61. #define GX_BIDI_CHARACTER_TYPE_S 0x0C /* Segment Separator */
  62. #define GX_BIDI_CHARACTER_TYPE_WS 0x0D /* Whitespace */
  63. #define GX_BIDI_CHARACTER_TYPE_ON 0x0E /* Other Neutrals */
  64. #define GX_BIDI_CHARACTER_TYPE_LRE 0x0F
  65. #define GX_BIDI_CHARACTER_TYPE_LRO 0x10
  66. #define GX_BIDI_CHARACTER_TYPE_RLE 0x11
  67. #define GX_BIDI_CHARACTER_TYPE_RLO 0x12
  68. #define GX_BIDI_CHARACTER_TYPE_PDF 0x13
  69. #define GX_BIDI_CHARACTER_TYPE_LRI 0x14
  70. #define GX_BIDI_CHARACTER_TYPE_RLI 0x15
  71. #define GX_BIDI_CHARACTER_TYPE_FSI 0x16
  72. #define GX_BIDI_CHARACTER_TYPE_PDI 0x17
  73. #define GX_BIDI_CATEGORY_STRONG 0x01
  74. #define GX_BIDI_CATEGORY_WEAK 0x02
  75. #define GX_BIDI_CATEGORY_NEUTRAL 0x03
  76. #define GX_BIDI_DIRECTION_FORMAT_LRE 0x202A /* Left to Right Embedding */
  77. #define GX_BIDI_DIRECTION_FORMAT_LRO 0x202D /* Left to Right Override */
  78. #define GX_BIDI_DIRECTION_FORMAT_RLE 0x202B /* Right to Left Embedding */
  79. #define GX_BIDI_DIRECTION_FORMAT_RLO 0x202E /* Right to Left Override */
  80. #define GX_BIDI_DIRECTION_FORMAT_PDF 0x202C /* Pop Directional Format */
  81. #define GX_BIDI_DIRECTION_FORMAT_LRI 0x2066 /* Left to Right Isolate */
  82. #define GX_BIDI_DIRECTION_FORMAT_RLI 0x2067 /* Right to Left Isolate */
  83. #define GX_BIDI_DIRECTION_FORMAT_FSI 0x2068 /* First Strong Isolate */
  84. #define GX_BIDI_DIRECTION_FORMAT_PDI 0x2069 /* Pop Directional Isolate */
  85. #define GX_BIDI_OVERRIDE_STATUS_N 0x01 /* No override is currently active */
  86. #define GX_BIDI_OVERRIDE_STATUS_R 0x02 /* Characters are to be reset to R */
  87. #define GX_BIDI_OVERRIDE_STATUS_L 0x03 /* Characters are to be reset to L */
  88. #define GX_BIDI_MAX_EXPLICIT_DEPTH 125
  89. #define GX_BIDI_MAX_BRACKET_DEPTH 63
  90. /* Define explicit entry structure. */
  91. typedef struct GX_BIDI_EXPLICIT_ENTRY_STRUCT
  92. {
  93. GX_UBYTE gx_bidi_explicit_level;
  94. GX_BOOL gx_bidi_explicit_override_status;
  95. GX_BOOL gx_bidi_explicit_isolate_status;
  96. } GX_BIDI_EXPLICIT_ENTRY;
  97. /* Define level run information structure. */
  98. typedef struct GX_BIDI_LEVEL_RUN_STRUCT
  99. {
  100. INT gx_bidi_level_run_start_index;
  101. INT gx_bidi_level_run_end_index;
  102. GX_UBYTE gx_bidi_level_run_level;
  103. struct GX_BIDI_LEVEL_RUN_STRUCT *gx_bidi_level_run_next;
  104. } GX_BIDI_LEVEL_RUN;
  105. /* Define isolate run sequence information structure. */
  106. typedef struct GX_BIDI_ISOLATE_RUN_STRUCT
  107. {
  108. INT *gx_bidi_isolate_run_index_list;
  109. INT gx_bidi_isolate_run_index_count;
  110. GX_UBYTE gx_bidi_isolate_run_sos;
  111. GX_UBYTE gx_bidi_isolate_run_eos;
  112. struct GX_BIDI_ISOLATE_RUN_STRUCT *gx_bidi_isolate_run_next;
  113. } GX_BIDI_ISOLATE_RUN;
  114. /* Define unicode information structure. */
  115. typedef struct GX_BIDI_UNIT_STRUCT
  116. {
  117. ULONG gx_bidi_unit_code;
  118. GX_UBYTE gx_bidi_unit_level;
  119. GX_UBYTE gx_bidi_unit_type;
  120. GX_UBYTE gx_bidi_unit_org_type;
  121. } GX_BIDI_UNIT;
  122. typedef struct GX_BIDI_TEXT_INFO_STRUCT
  123. {
  124. GX_STRING gx_bidi_text_info_text;
  125. GX_FONT *gx_bidi_text_info_font;
  126. GX_VALUE gx_bidi_text_info_display_width;
  127. } GX_BIDI_TEXT_INFO;
  128. /* Define a truture to keep parameters for a bunch of functions. */
  129. typedef struct GX_BIDI_CONTEXT_STRUCT
  130. {
  131. GX_BIDI_TEXT_INFO *gx_bidi_context_input_info;
  132. UINT gx_bidi_context_processced_size;
  133. UINT gx_bidi_context_total_lines;
  134. GX_BIDI_UNIT *gx_bidi_context_unit_list;
  135. INT gx_bidi_context_unit_count;
  136. INT *gx_bidi_context_line_index_cache;
  137. GX_BIDI_LEVEL_RUN *gx_bidi_context_level_runs;
  138. GX_BIDI_ISOLATE_RUN *gx_bidi_context_isolate_runs;
  139. GX_UBYTE *gx_bidi_context_buffer;
  140. UINT gx_bidi_context_buffer_size;
  141. UINT gx_bidi_context_buffer_index;
  142. UINT gx_bidi_context_bracket_pair_size;
  143. GX_UBYTE gx_bidi_context_base_level;
  144. ULONG gx_bidi_context_reordered_utf8_size;
  145. } GX_BIDI_CONTEXT;
  146. typedef struct GX_BIDI_RESOLVED_TEXT_INFO_STRUCT
  147. {
  148. GX_STRING *gx_bidi_resolved_text_info_text;
  149. UINT gx_bidi_resolved_text_total_lines;
  150. UINT gx_bidi_resolved_text_processed_count;
  151. } GX_BIDI_RESOLVED_TEXT_INFO;
  152. /* Define bidirectional character infomation structure. */
  153. typedef struct GX_BIDI_CHARACTER_INFO_STRUCT
  154. {
  155. ULONG gx_bidi_character_info_range_start;
  156. ULONG gx_bidi_character_info_range_end;
  157. GX_UBYTE gx_bidi_character_info_type;
  158. } GX_BIDI_CHARACTER_INFO;
  159. typedef struct GX_BIDI_BRACKET_PAIR_STRUCT
  160. {
  161. ULONG gx_bidi_bracket_pair_open;
  162. ULONG gx_bidi_bracket_pair_close;
  163. } GX_BIDI_BRACKET_PAIR;
  164. #endif
  165. #define GX_UTILITY_MATH_UINT_ADD(augend, addend, result) \
  166. if ((UINT)-1 - (augend) < (addend)) \
  167. { \
  168. return GX_MATH_OVERFLOW; \
  169. } \
  170. else \
  171. { \
  172. (result) = (augend) + (addend); \
  173. }
  174. #define GX_UTILITY_MATH_UINT_MULT(multiplicand, multiplier, result) \
  175. if ((UINT)-1 / (multiplier) < (multiplicand)) \
  176. { \
  177. return GX_MATH_OVERFLOW; \
  178. } \
  179. else \
  180. { \
  181. (result) = (multiplicand) * (multiplier); \
  182. }
  183. #define GX_UTILITY_MATH_USHORT_ADD(augend, addend, result) \
  184. if ((USHORT)-1 - (augend) < (addend)) \
  185. { \
  186. return GX_MATH_OVERFLOW; \
  187. } \
  188. else \
  189. { \
  190. (result) = (USHORT)((augend) + (addend)); \
  191. }
  192. #define GX_UTILITY_MATH_USHORT_MULT(multiplicand, multiplier, result) \
  193. if ((USHORT)-1 / (multiplier) < (multiplicand)) \
  194. { \
  195. return GX_MATH_OVERFLOW; \
  196. } \
  197. else \
  198. { \
  199. result = (USHORT)((multiplicand) * (multiplier)); \
  200. }
  201. #define GX_UTILITY_USHORT_CHECK(a)\
  202. if((a) > (USHORT)-1) \
  203. { \
  204. return GX_MATH_OVERFLOW; \
  205. }
  206. /* Define utility component function prototypes. */
  207. UINT _gx_utility_1bpp_pixelmap_resize(GX_PIXELMAP *src, GX_PIXELMAP *destination, INT width, INT height);
  208. UINT _gx_utility_1bpp_pixelmap_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  209. UINT _gx_utility_1bpp_pixelmap_simple_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  210. UINT _gx_utility_4bpp_pixelmap_resize(GX_PIXELMAP *src, GX_PIXELMAP *destination, INT width, INT height);
  211. UINT _gx_utility_4bpp_pixelmap_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  212. UINT _gx_utility_4bpp_pixelmap_simple_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  213. UINT _gx_utility_8bpp_pixelmap_resize(GX_PIXELMAP *src, GX_PIXELMAP *destination, INT width, INT height);
  214. UINT _gx_utility_8bit_alphamap_resize(GX_PIXELMAP *src, GX_PIXELMAP *destination, INT width, INT height);
  215. UINT _gx_utility_8bpp_pixelmap_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  216. UINT _gx_utility_8bpp_pixelmap_simple_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  217. UINT _gx_utility_8bit_alphamap_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  218. UINT _gx_utility_16bpp_pixelmap_resize(GX_PIXELMAP *src, GX_PIXELMAP *destination, INT width, INT height);
  219. UINT _gx_utility_32argb_pixelmap_resize(GX_PIXELMAP *src, GX_PIXELMAP *destination, INT width, INT height);
  220. UINT _gx_utility_32argb_pixelmap_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  221. UINT _gx_utility_32argb_pixelmap_simple_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  222. UINT _gx_utility_332rgb_pixelmap_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  223. UINT _gx_utility_332rgb_pixelmap_simple_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  224. UINT _gx_utility_565rgb_pixelmap_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  225. UINT _gx_utility_565rgb_pixelmap_simple_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  226. UINT _gx_utility_1555xrgb_pixelmap_resize(GX_PIXELMAP *src, GX_PIXELMAP *destination, INT width, INT height);
  227. UINT _gx_utility_1555xrgb_pixelmap_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  228. UINT _gx_utility_4444argb_pixelmap_resize(GX_PIXELMAP *src, GX_PIXELMAP *destination, INT width, INT height);
  229. UINT _gx_utility_4444argb_pixelmap_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  230. UINT _gx_utility_4444argb_pixelmap_simple_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  231. UINT _gx_utility_alphamap_create(INT width, INT height, GX_PIXELMAP *map);
  232. UINT _gx_utility_circle_point_get(INT xcenter, INT ycenter, UINT r, INT angle, GX_POINT *point);
  233. UINT _gx_utility_easing_function_calculate(USHORT easing_function_style, INT start_val, INT end_val, INT t, INT d, INT *return_value);
  234. VOID _gx_utility_glyph_1bpp_to_alphamap_draw(GX_PIXELMAP *map, INT xpos, INT ypos, GX_CONST GX_GLYPH *glyph);
  235. VOID _gx_utility_glyph_4bpp_to_alphamap_draw(GX_PIXELMAP *map, INT xpos, INT ypos, GX_CONST GX_GLYPH *glyph);
  236. VOID _gx_utility_glyph_8bpp_to_alphamap_draw(GX_PIXELMAP *map, INT xpos, INT ypos, GX_CONST GX_GLYPH *glyph);
  237. #if defined(GX_SYNERGY_FONT_FORMAT_SUPPORT)
  238. VOID _gx_utility_glyph_reversed_4bpp_to_alphamap_draw(GX_PIXELMAP *map, INT xpos, INT ypos, GX_CONST GX_GLYPH *glyph);
  239. VOID _gx_utility_glyph_reversed_1bpp_to_alphamap_draw(GX_PIXELMAP *map, INT xpos, INT ypos, GX_CONST GX_GLYPH *glyph);
  240. #endif
  241. UINT _gx_utility_gradient_create(GX_GRADIENT *gradient, GX_VALUE width, GX_VALUE height, UCHAR type, GX_UBYTE start_alpha, GX_UBYTE end_alpha);
  242. UINT _gx_utility_gradient_delete(GX_GRADIENT *gradient);
  243. UINT _gx_utility_canvas_to_bmp(GX_CANVAS *canvas, GX_RECTANGLE *rect, UINT (*write_data)(GX_UBYTE *byte_data, UINT data_count));
  244. UINT _gx_utility_ltoa(LONG value, GX_CHAR *return_buffer, UINT return_buffer_size);
  245. #if defined(GUIX_5_4_0_COMPATIBILITY)
  246. INT _gx_utility_math_acos_5_4_0(INT x);
  247. INT _gx_utility_math_asin_5_4_0(INT x);
  248. INT _gx_utility_math_cos_5_4_0(INT angle);
  249. INT _gx_utility_math_sin_5_4_0(INT angle);
  250. #endif
  251. INT _gx_utility_math_acos(GX_FIXED_VAL x);
  252. INT _gx_utility_math_asin(GX_FIXED_VAL x);
  253. GX_FIXED_VAL _gx_utility_math_cos(GX_FIXED_VAL angle);
  254. GX_FIXED_VAL _gx_utility_math_sin(GX_FIXED_VAL angle);
  255. UINT _gx_utility_math_sqrt(UINT n);
  256. UINT _gx_utility_pixelmap_resize(GX_PIXELMAP *src, GX_PIXELMAP *destination, INT width, INT height);
  257. UINT _gx_utility_pixelmap_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  258. UINT _gx_utility_pixelmap_simple_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  259. UINT _gx_utility_rectangle_center(GX_RECTANGLE *rectangle, GX_RECTANGLE *within);
  260. UINT _gx_utility_rectangle_center_find(GX_RECTANGLE *rectangle, GX_POINT *return_center);
  261. UINT _gx_utility_rectangle_combine(GX_RECTANGLE *first_rectangle, GX_RECTANGLE *second_rectangle);
  262. GX_BOOL _gx_utility_rectangle_compare(GX_RECTANGLE *first_rectangle, GX_RECTANGLE *second_rectangle);
  263. UINT _gx_utility_rectangle_define(GX_RECTANGLE *rectangle, GX_VALUE left, GX_VALUE top, GX_VALUE right, GX_VALUE bottom);
  264. GX_BOOL _gx_utility_rectangle_inside_detect(GX_RECTANGLE *outer, GX_RECTANGLE *inner);
  265. GX_BOOL _gx_utility_rectangle_overlap_detect(GX_RECTANGLE *first_rectangle, GX_RECTANGLE *second_rectangle, GX_RECTANGLE *return_overlap_area);
  266. GX_BOOL _gx_utility_rectangle_point_detect(GX_RECTANGLE *rectangle, GX_POINT point);
  267. UINT _gx_utility_rectangle_resize(GX_RECTANGLE *rectangle, GX_VALUE adjust);
  268. UINT _gx_utility_rectangle_shift(GX_RECTANGLE *rectangle, GX_VALUE x_shift, GX_VALUE y_shift);
  269. #if defined(GX_DYNAMIC_BIDI_TEXT_SUPPORT)
  270. #if defined(GX_DYNAMIC_ARABIC_SHAPING_SUPPORT)
  271. UINT _gx_utility_bidi_arabic_shaping(GX_BIDI_CONTEXT *context);
  272. #endif
  273. UINT _gx_utility_bidi_bracket_pair_get(ULONG code, GX_BIDI_BRACKET_PAIR *bracket_pair);
  274. UINT _gx_utility_bidi_character_type_get(ULONG code, GX_UBYTE *type);
  275. UINT _gx_utility_bidi_mirroring_get(USHORT code, USHORT *mirror);
  276. UINT _gx_utility_bidi_paragraph_reorder(GX_BIDI_TEXT_INFO *input_info, GX_BIDI_RESOLVED_TEXT_INFO *resolved_info);
  277. #endif
  278. #ifdef GX_THAI_GLYPH_SHAPING_SUPPORT
  279. UINT _gx_utility_thai_glyph_shaping(GX_CONST GX_STRING *string, GX_CHAR_CODE **returned_code_list, UINT *returned_code_count);
  280. #endif
  281. UINT _gx_utility_string_length_check(GX_CONST GX_CHAR *string, UINT *length, UINT max_string_length);
  282. #if defined(GX_ENABLE_DEPRECATED_STRING_API)
  283. UINT _gx_utility_string_to_alphamap(GX_CONST GX_CHAR *text, GX_CONST GX_FONT *font, GX_PIXELMAP *textmap);
  284. #endif
  285. UINT _gx_utility_string_to_alphamap_ext(GX_CONST GX_STRING *text, GX_CONST GX_FONT *font, GX_PIXELMAP *textmap);
  286. VOID _gx_utility_string_to_alphamap_draw(GX_CONST GX_STRING *text, GX_CONST GX_FONT *font, GX_PIXELMAP *map);
  287. #ifdef GX_UTF8_SUPPORT
  288. UINT _gx_utility_unicode_to_utf8(ULONG unicode, GX_UBYTE *return_utf8_str, UINT *return_utf8_size);
  289. UINT _gx_utility_utf8_string_character_get(GX_STRING *utf8_str, GX_CHAR_CODE *glyph_value, UINT *glyph_len);
  290. UINT _gx_utility_utf8_string_backward_character_length_get(GX_STRING *utf8_str, INT start_index, UINT *glyph_len);
  291. #endif /* GX_UTF8_SUPPORT */
  292. /* Define error checking shells for API services. These are only referenced by the
  293. application. */
  294. UINT _gxe_utility_canvas_to_bmp(GX_CANVAS *canvas, GX_RECTANGLE *rect, UINT (*write_data)(GX_UBYTE *byte_data, UINT data_count));
  295. UINT _gxe_utility_circle_point_get(INT xcenter, INT ycenter, UINT r, INT angle, GX_POINT *point);
  296. UINT _gxe_utility_gradient_create(GX_GRADIENT *gradient, GX_VALUE width, GX_VALUE height, UCHAR type, GX_UBYTE start_alpha, GX_UBYTE end_alpha);
  297. UINT _gxe_utility_gradient_delete(GX_GRADIENT *gradient);
  298. UINT _gxe_utility_ltoa(LONG value, GX_CHAR *return_buffer, UINT return_buffer_size);
  299. UINT _gxe_utility_pixelmap_resize(GX_PIXELMAP *src, GX_PIXELMAP *destination, INT width, INT height);
  300. UINT _gxe_utility_pixelmap_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  301. UINT _gxe_utility_pixelmap_simple_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy);
  302. UINT _gxe_utility_rectangle_center(GX_RECTANGLE *rectangle, GX_RECTANGLE *within);
  303. UINT _gxe_utility_rectangle_center_find(GX_RECTANGLE *rectangle, GX_POINT *return_center);
  304. UINT _gxe_utility_rectangle_combine(GX_RECTANGLE *first_rectangle, GX_RECTANGLE *second_rectangle);
  305. GX_BOOL _gxe_utility_rectangle_compare(GX_RECTANGLE *first_rectangle, GX_RECTANGLE *second_rectangle);
  306. UINT _gxe_utility_rectangle_define(GX_RECTANGLE *rectangle, GX_VALUE left, GX_VALUE top, GX_VALUE right, GX_VALUE bottom);
  307. UINT _gxe_utility_rectangle_resize(GX_RECTANGLE *rectangle, GX_VALUE adjust);
  308. GX_BOOL _gxe_utility_rectangle_overlap_detect(GX_RECTANGLE *first_rectangle, GX_RECTANGLE *second_rectangle, GX_RECTANGLE *return_overlap_area);
  309. GX_BOOL _gxe_utility_rectangle_point_detect(GX_RECTANGLE *rectangle, GX_POINT point);
  310. UINT _gxe_utility_rectangle_shift(GX_RECTANGLE *rectangle, GX_VALUE x_shift, GX_VALUE y_shift);
  311. #if defined(GX_ENABLE_DEPRECATED_STRING_API)
  312. UINT _gxe_utility_string_to_alphamap(GX_CONST GX_CHAR *text, GX_CONST GX_FONT *font, GX_PIXELMAP *textmap);
  313. #endif
  314. UINT _gxe_utility_string_to_alphamap_ext(GX_CONST GX_STRING *text, GX_CONST GX_FONT *font, GX_PIXELMAP *textmap);
  315. #endif