microvg  8.0.3
microvg
vg_outline_box.h
Go to the documentation of this file.
1 /*
2  * C
3  *
4  * Copyright 2026 MicroEJ Corp. All rights reserved.
5  * MicroEJ Corp. PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  *
7  * Build: 7E4D1F7C
8  */
9 
17 #if !defined VG_OUTLINE_BOX_H
18 #define VG_OUTLINE_BOX_H
19 
20 #if defined __cplusplus
21 extern "C" {
22 #endif
23 
24 // -----------------------------------------------------------------------------
25 // Includes
26 // -----------------------------------------------------------------------------
27 
28 #include "vg_configuration.h"
29 
30 #if defined VG_FEATURE_FONT && \
31  (defined VG_FEATURE_FONT_FREETYPE_VECTOR || defined VG_FEATURE_FONT_FREETYPE_BITMAP) && \
32  (VG_FEATURE_FONT == VG_FEATURE_FONT_FREETYPE_VECTOR || VG_FEATURE_FONT == VG_FEATURE_FONT_FREETYPE_BITMAP)
33 
34 #include <stdbool.h>
35 #include <freetype/ftoutln.h>
36 
37 // -----------------------------------------------------------------------------
38 // Typedef
39 // -----------------------------------------------------------------------------
40 
47 typedef struct {
48  float x_min;
49  float x_max;
50  float y_min;
51  float y_max;
52  bool empty;
54 
55 // -----------------------------------------------------------------------------
56 // API
57 // -----------------------------------------------------------------------------
58 
72 void VG_OUTLINE_BOX_compute(const FT_Outline *outline, VG_OUTLINE_BOX *box);
73 
74 // cppcheck-suppress [misra-c2012-3.2]
75 #endif \
76  // defined VG_FEATURE_FONT && \
77  // (defined VG_FEATURE_FONT_FREETYPE_VECTOR || defined VG_FEATURE_FONT_FREETYPE_BITMAP) && \
78  // (VG_FEATURE_FONT == VG_FEATURE_FONT_FREETYPE_VECTOR || VG_FEATURE_FONT == VG_FEATURE_FONT_FREETYPE_BITMAP)
79 
80 // -----------------------------------------------------------------------------
81 // EOF
82 // -----------------------------------------------------------------------------
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
88 #endif // !defined VG_OUTLINE_BOX_H
The box of the curve an outline draws, control points excluded.
MicroEJ MicroVG library low level API: enable some features according to the hardware capacities.
void VG_OUTLINE_BOX_compute(const FT_Outline *outline, VG_OUTLINE_BOX *box)
Computes the box of the curve the given outline draws, where the box a font declares also bounds the ...