microui  14.5.5
microui
ui_image_drawing.h
1 /*
2  * Copyright 2023-2026 MicroEJ Corp. All rights reserved.
3  * MicroEJ Corp. PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4  */
5 
6 #if !defined UI_IMAGE_DRAWING_H
7 #define UI_IMAGE_DRAWING_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
49 // --------------------------------------------------------------------------------
50 // Includes
51 // --------------------------------------------------------------------------------
52 
53 #include "ui_drawing.h"
54 
55 // --------------------------------------------------------------------------------
56 // API
57 // --------------------------------------------------------------------------------
58 
75 DRAWING_Status UI_IMAGE_DRAWING_draw(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
76  jint width, jint height, jint x, jint y, jint alpha);
77 
78 /*
79  * @brief Copy a region of an image in another image with the same pixel format.
80  * @see UI_DRAWING_copyImage
81  */
82 DRAWING_Status UI_IMAGE_DRAWING_copy(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
83  jint width, jint height, jint x, jint y);
84 
85 /*
86  * @brief Draw a region of an image in the same image.
87  * @see UI_DRAWING_drawRegion
88  */
89 DRAWING_Status UI_IMAGE_DRAWING_drawRegion(MICROUI_GraphicsContext *gc, jint regionX, jint regionY, jint width,
90  jint height, jint x, jint y, jint alpha);
91 
92 /*
93  * @brief Draws an image applying a flip.
94  * @see UI_DRAWING_drawFlippedImage
95  */
96 DRAWING_Status UI_IMAGE_DRAWING_drawFlipped(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
97  jint width, jint height, jint x, jint y, DRAWING_Flip transformation,
98  jint alpha);
99 
100 /*
101  * @brief Draws an image applying a free rotation (0 to 360 degrees).
102  * @see UI_DRAWING_drawRotatedImageNearestNeighbor
103  */
104 DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
105  jint y, jint rotationX, jint rotationY, jfloat angle,
106  jint alpha);
107 
108 /*
109  * @brief Draws an image applying a free rotation (0 to 360 degrees).
110  * @see UI_DRAWING_drawRotatedImageBilinear
111  */
112 DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x, jint y,
113  jint rotationX, jint rotationY, jfloat angle, jint alpha);
114 
115 /*
116  * @brief Draws an image applying a scaling.
117  * @see UI_DRAWING_drawScaledImageNearestNeighbor
118  */
119 DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
120  jint y, jfloat factorX, jfloat factorY, jint alpha);
121 
122 /*
123  * @brief Draws an image applying a scaling.
124  * @see UI_DRAWING_drawScaledImageBilinear
125  */
126 DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x, jint y,
127  jfloat factorX, jfloat factorY, jint alpha);
128 
129 // --------------------------------------------------------------------------------
130 // EOF
131 // --------------------------------------------------------------------------------
132 
133 #ifdef __cplusplus
134 }
135 #endif
136 
137 #endif // UI_IMAGE_DRAWING_H