1 /* TSI 2023.xmo */ 2 /******************************************************************************* 3 * Copyright (c) 2023 Think Silicon Single Member PC 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a copy 6 * of this header file and/or associated documentation files to use, copy, 7 * modify, merge, publish, distribute, sublicense, and/or sell copies of the 8 * Materials, and to permit persons to whom the Materials are furnished to do 9 * so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included in 12 * all copies or substantial portions of the Materials. 13 * 14 * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS 15 * NEMAGFX API. THE UNMODIFIED, NORMATIVE VERSIONS OF THINK-SILICON NEMAGFX 16 * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT: 17 * https://think-silicon.com/products/software/nemagfx-api 18 * 19 * The software is provided 'as is', without warranty of any kind, express or 20 * implied, including but not limited to the warranties of merchantability, 21 * fitness for a particular purpose and noninfringement. In no event shall 22 * Think Silicon Single Member PC be liable for any claim, damages or other 23 * liability, whether in an action of contract, tort or otherwise, arising 24 * from, out of or in connection with the software or the use or other dealings 25 * in the software. 26 ******************************************************************************/ 27 28 29 #ifndef NEMA_RASTER_H__ 30 #define NEMA_RASTER_H__ 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 /** \private */ 37 void nema_set_raster_color(uint32_t rgba8888); 38 39 /** \private */ 40 void nema_raster_pixel(int x, int y); 41 42 /** \private */ 43 void nema_raster_line(int x0, int y0, int x1, int y1); 44 45 /** \private */ 46 void nema_raster_triangle_fx(int x0fx, int y0fx, int x1fx, int y1fx, int x2fx, int y2fx); 47 48 49 /** \private */ 50 void nema_raster_rect(int x, int y, int w, int h); 51 52 /** \private */ 53 void nema_raster_rounded_rect(int x0, int y0, int w, int h, int r); 54 55 56 /** \private */ 57 void nema_raster_quad_fx(int x0fx, int y0fx, 58 int x1fx, int y1fx, int x2fx, int y2fx, int x3fx, int y3fx); 59 60 /** \private */ 61 void nema_raster_triangle (int x0, int y0, int x1, int y1, int x2, int y2); 62 63 /** \private */ 64 void nema_raster_quad (int x0,int y0,int x1,int y1,int x2,int y2,int x3,int y3); 65 66 /** \private */ 67 void nema_raster_circle(float x, float y, float r); 68 69 /** \private */ 70 void nema_raster_circle_aa(float x, float y, float r); 71 72 /** \private */ 73 void nema_raster_stroked_circle_aa(float x, float y, float r, float w); 74 75 /** \private */ 76 void nema_raster_rect_fx(int xfx, int yfx, int wfx, int hfx); 77 78 /** \private */ 79 void nema_raster_rect_f(float x, float y, float w, float h); 80 81 /** \private */ 82 void 83 nema_raster_triangle_f(float x0, float y0, float x1, float y1, float x2, float y2); 84 85 /** \private */ 86 void 87 nema_raster_triangle_p0_f(float x0, float y0); 88 89 /** \private */ 90 void 91 nema_raster_triangle_p1_f(float x1, float y1); 92 93 /** \private */ 94 void 95 nema_raster_triangle_p2_f(float x2, float y2); 96 97 /** \private */ 98 void 99 nema_raster_quad_f(float x0, float y0, float x1, float y1, 100 float x2, float y2, float x3, float y3); 101 102 /** \private */ 103 void 104 nema_raster_stroked_arc_aa( float x0, float y0, float r, float w, float start_angle, float end_angle); 105 106 /** \private */ 107 // aa_mask: 108 // RAST_AA_E0: AA on first ending 109 // RAST_AA_E2: AA on last ending 110 void 111 nema_raster_stroked_arc_aa_mask( float x0, float y0, float r, float w, float start_angle, float end_angle, uint32_t aa_mask); 112 113 #ifdef __cplusplus 114 } 115 #endif 116 117 #endif //NEMA_RASTER_H__ 118