From 72592f4284c270af39f13cfe8799bf96eb6bb66a Mon Sep 17 00:00:00 2001
From: patacongo
2.5.1
NXFONTS Types()
- 2.5.2 nxf_getfontset()
- 2.5.3 nxf_getbitmap()
- 2.5.4 nxf_convert_*bpp()
+ 2.5.2 nxf_getfonthandle()
+ 2.5.3 nxf_getfontset()
+ 2.5.4 nxf_getbitmap()
+ 2.5.5 nxf_convert_*bpp()
@@ -2365,7 +2366,7 @@ struct nx_fontmetric_s struct nx_fontbitmap_s { struct nx_fontmetric_s metric; /* Character metrics */ - FAR const uint8_t *bitmap; /* Pointer to the character bitmap */ + FAR const uint8_t *bitmap; /* Pointer to the character bitmap */ }; @@ -2396,13 +2397,36 @@ struct nx_font_s }; -
nxf_getfontset()nxf_getfonthandle()Function Prototype:
++#include <nuttx/nxfonts.h> + +NXHANDLE nxf_getfonthandle(enum nx_fontid_e fontid); ++
+ Description: + Given a numeric font ID, return a handle that may be subsequently be used to access the font data sets. +
++ Input Parameters: +
fontid
+ + Returned Value: + A handle that may be subsequently be used to access the font data sets. +
+ +nxf_getfontset()Function Prototype:
#include <nuttx/nxglib.h> #include <nuttx/nxfonts.h> -FAR const struct nx_font_s *nxf_getfontset(enum nx_fontid_e fontid); +FAR const struct nx_font_s *nxf_getfontset(NXHANDLE handle);
Description: @@ -2411,8 +2435,8 @@ FAR const struct nx_font_s *nxf_getfontset(enum nx_fontid_e fontid);
Input Parameters:
fontid
- handle
+ nxf_getfonthandle().
@@ -2420,13 +2444,13 @@ FAR const struct nx_font_s *nxf_getfontset(enum nx_fontid_e fontid);
An instance of struct nx_font_s describing the font set.
nxf_getbitmap()nxf_getbitmap()Function Prototype:
#include <nuttx/nxglib.h> #include <nuttx/nxfonts.h> -FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16_t ch, enum nx_fontid_e fontid); +FAR const struct nx_fontbitmap_s *nxf_getbitmap(NXHANDLE handle, uint16_t ch);
Description: @@ -2436,9 +2460,9 @@ FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16_t ch, enum nx_fontid_e fo Input Parameters:
ch
- fontid
- handle
+ nxf_getfonthandle().
@@ -2446,7 +2470,7 @@ FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16_t ch, enum nx_fontid_e fo
An instance of struct nx_fontbitmap_s describing the glyph.
nxf_convert_*bpp()nxf_convert_*bpp()Function Prototype:
#include <nuttx/nxglib.h> @@ -2505,13 +2529,27 @@ int nxf_convert_32bpp(FAR uint32_t *dest, uint16_t height,2.6 Sample Code
-
apps/examples/nx. ++
apps/examples/nx*. No sample code is provided in this document. - However, an example can be found in the NuttX source tree atapps/examples/nx. - That code is intended to test NX. - Since it is test code, it is designed to exercise functionality and does not necessarily - represent best NX coding practices. + However, examples can be found in the NuttX source tree at the follow locations: + That example code is intended to test NX. + Since it is test code, it is designed to exercise functionality and does not necessarily represent best NX coding practices.
apps/examples/nx.
+ This is a test of windows, optionally with toolbars.
+ Two windows are created, re-sized, moved, raise lowered.
+ Simulated mouse and keyboard input is provided.
+ apps/examples/nxhello.
+ This is intended to be simplest NX test:
+ It simply displays the words "Hello, World!" centered on the display.
+ apps/examples/nxtext.
+ This illustrates how fonts may be managed to provide scrolling text windows.
+ Pop-up windows are included to verify the clipping and re-drawing of the text display.
+ In its current form, the NX graphics system provides a low level of graphics and window @@ -2963,13 +3001,17 @@ make
nx_requestbkgd()apps/examples/nxtext and apps/examples/nxhello.
+ nx_releasebkgd()apps/examples/nxtext and apps/examples/nxhello.
+ nx_getposition()nxf_getfonthandle()nxf_getfontset()nxf_convert_16bpp()nxf_convert_24bpp()