aboutsummaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-03-28 01:52:00 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-03-28 01:52:00 +0000
commit52bf8b3bf1f8d89cc551d520e909bc8355c2fae4 (patch)
tree798ae3360b28c3da16566c60b714d17107557c5d /nuttx
parentfb9d418f66f4ed9a516cc26e056ffedabcb78169 (diff)
downloadpx4-firmware-52bf8b3bf1f8d89cc551d520e909bc8355c2fae4.tar.gz
px4-firmware-52bf8b3bf1f8d89cc551d520e909bc8355c2fae4.tar.bz2
px4-firmware-52bf8b3bf1f8d89cc551d520e909bc8355c2fae4.zip
More NX Console fixes... good progress but still not ready for prime time
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4533 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx')
-rwxr-xr-xnuttx/Documentation/NxWidgets.html126
-rw-r--r--nuttx/graphics/nxbe/nxbe_bitmap.c14
-rw-r--r--nuttx/graphics/nxconsole/nxcon_internal.h2
3 files changed, 76 insertions, 66 deletions
diff --git a/nuttx/Documentation/NxWidgets.html b/nuttx/Documentation/NxWidgets.html
index 41f041162..165248145 100755
--- a/nuttx/Documentation/NxWidgets.html
+++ b/nuttx/Documentation/NxWidgets.html
@@ -1,59 +1,67 @@
-<html>
-<head>
-<title>NxWidgets</title>
-</head>
-<body background="backgd.gif">
-<hr><hr>
-<table width ="100%">
- <tr align="center" bgcolor="#e4e4e4">
- <td>
- <h1><big><font color="#3c34ec"><i>NxWidgets</i></font></big></h1>
- <p>Last Updated: March 24, 2012</p>
- </td>
- </tr>
-</table>
-<h1>NXWidgets</h1>
-<p>
- In order to better support NuttX based platforms, a special graphical userinterface has been created called NXWidgets.
- NXWidgets is written in C++ and integrates seamlessly with the NuttX <a href="NXGraphicsSubsystem.html">NX graphics subsystem</a> in order to provide graphic objects, or &quot;widgets,&quot; in the NX Graphics Subsystem
-</p>
-<p>
- Some of the features of NXWidgets include:
-</p>
-<ul>
- <li><b>Conservative C++</b>.
- NXWidgets is written entirely in C++ but using only selected &quot;embedded friendly&quot; C++ constructs that are fully supported under NuttX.
- No additional C++ support libraries are required.
- </li>
- <li><b>NX Integration</b>.
- NXWidgets integrate seamlessly with the <a href="NXGraphicsSubsystem.html">NX graphics subsystem</a>.
- Think of the X server under Linux … the NX graphics system is like a tiny X server that provides windowing under NuttX.
- By adding NXWidgets, you can support graphics objects like buttons and text boxes in the NX windows and toolbars.
- </li>
- <li><b>Small Footprint</b>.
- NXWidgets is tailored for use MCUs in embedded applications.
- It is ideally suited for mid- and upper-range of most MCU families.
- A complete NXWidgets is possible in as little as 40Kb of FLASH and maybe 4Kb of SRAM.
- </li>
- <li><b>Output Devices</b>.
- NXWidgets will work on the high-end frame buffer devices as well as on LCDs connected via serial or parallel ports to a small MCU.
- </li>
- <li><b>Input Devices</b>.
- NXWidgets will accept position and selection inputs from a mouse or a touchscreen.
- It will also support character input from a keyboard such as a USB keyboard.
- NXWidgets supports on very special widget called CKeypad that will provide keyboard input via an on-screen keypad that can be operated via mouse or touchscreen inputs.
- </li>
- <li><b>Many Graphic Objects</b>.
- Some of the graphic objects supported by NXWidgets include labels, buttons, text boxes, button arrays, check boxes, cycle buttons, images, sliders, scrollable list boxes, progress bars, and more.
- </li>
- <li><b>DOxygen Documentation</ba>
- DOxygen documentation is available.
- </li>
-</ul>
-<p>
- Note: Many of the fundamental classed in NxWidgets derive from the Antony
- Dzeryn's &quot;Woopsi&quot; project: http://woopsi.org/ which also has a BSD style
- license. See the COPYING file for details.
-</p>
-</body>
-</html>
+<html>
+<head>
+<title>NxWidgets</title>
+</head>
+<body background="backgd.gif">
+<hr><hr>
+<table width ="100%">
+ <tr align="center" bgcolor="#e4e4e4">
+ <td>
+ <h1><big><font color="#3c34ec"><i>NxWidgets</i></font></big></h1>
+ <p>Last Updated: March 27, 2012</p>
+ </td>
+ </tr>
+</table>
+<h1>NXWidgets</h1>
+<p>
+ In order to better support NuttX based platforms, a special graphical userinterface has been created called NXWidgets.
+ NXWidgets is written in C++ and integrates seamlessly with the NuttX <a href="NXGraphicsSubsystem.html">NX graphics subsystem</a> in order to provide graphic objects, or &quot;widgets,&quot; in the NX Graphics Subsystem
+</p>
+<p>
+ Some of the features of NXWidgets include:
+</p>
+<ul>
+ <li><b>Conservative C++</b>.
+ NXWidgets is written entirely in C++ but using only selected &quot;embedded friendly&quot; C++ constructs that are fully supported under NuttX.
+ No additional C++ support libraries are required.
+ </li>
+ <li><b>NX Integration</b>.
+ NXWidgets integrate seamlessly with the <a href="NXGraphicsSubsystem.html">NX graphics subsystem</a>.
+ Think of the X server under Linux … the NX graphics system is like a tiny X server that provides windowing under NuttX.
+ By adding NXWidgets, you can support graphics objects like buttons and text boxes in the NX windows and toolbars.
+ </li>
+ <li><b>Small Footprint</b>.
+ NXWidgets is tailored for use MCUs in embedded applications.
+ It is ideally suited for mid- and upper-range of most MCU families.
+ A complete NXWidgets is possible in as little as 40Kb of FLASH and maybe 4Kb of SRAM.
+ </li>
+ <li><b>Output Devices</b>.
+ NXWidgets will work on the high-end frame buffer devices as well as on LCDs connected via serial or parallel ports to a small MCU.
+ </li>
+ <li><b>Input Devices</b>.
+ NXWidgets will accept position and selection inputs from a mouse or a touchscreen.
+ It will also support character input from a keyboard such as a USB keyboard.
+ NXWidgets supports on very special widget called CKeypad that will provide keyboard input via an on-screen keypad that can be operated via mouse or touchscreen inputs.
+ </li>
+ <li><b>Many Graphic Objects</b>.
+ Some of the graphic objects supported by NXWidgets include labels, buttons, text boxes, button arrays, check boxes, cycle buttons, images, sliders, scrollable list boxes, progress bars, and more.
+ </li>
+ <li><b>DOxygen Documentation</b>
+ DOxygen documentation is available.
+ </li>
+</ul>
+<p>
+ Note: Many of the fundamental classed in NxWidgets derive from the Antony
+ Dzeryn's &quot;Woopsi&quot; project: http://woopsi.org/ which also has a BSD style
+ license. See the COPYING file for details.
+</p>
+<h1>NXWidgets DOxygen Documentation</h1>
+<p>
+ DOxygen documentation for the NxWidgets-1.0 is now available online at <a href="http://www.nx-engineering.com/nxwidgets_v1_0/">this location</a>.
+</p>
+<p>
+ Thanks go to Jose Pablo Carballo for contributing this!
+</p>
+</p>
+</body>
+</html>
diff --git a/nuttx/graphics/nxbe/nxbe_bitmap.c b/nuttx/graphics/nxbe/nxbe_bitmap.c
index 75692ecb5..991b91d82 100644
--- a/nuttx/graphics/nxbe/nxbe_bitmap.c
+++ b/nuttx/graphics/nxbe/nxbe_bitmap.c
@@ -135,16 +135,11 @@ void nxbe_bitmap(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s *de
}
#endif
- /* Offset the rectangle and image origin by the window origin */
-
- nxgl_rectoffset(&bounds, dest, wnd->bounds.pt1.x, wnd->bounds.pt1.y);
- nxgl_vectoradd(&offset, origin, &wnd->bounds.pt1);
-
/* Verify that the destination rectangle begins "below" and to the "right"
* of the origin
*/
- if (bounds.pt1.x < origin->x || bounds.pt1.y < origin->y)
+ if (dest->pt1.x < origin->x || dest->pt1.y < origin->y)
{
gdbg("Bad dest start position\n");
return;
@@ -154,13 +149,18 @@ void nxbe_bitmap(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s *de
* width of the source bitmap data (taking into account the bitmap origin)
*/
- deststride = (((bounds.pt2.x - origin->x + 1) * wnd->be->plane[0].pinfo.bpp + 7) >> 3);
+ deststride = (((dest->pt2.x - origin->x + 1) * wnd->be->plane[0].pinfo.bpp + 7) >> 3);
if (deststride > stride)
{
gdbg("Bad dest width\n");
return;
}
+ /* Offset the rectangle and image origin by the window origin */
+
+ nxgl_rectoffset(&bounds, dest, wnd->bounds.pt1.x, wnd->bounds.pt1.y);
+ nxgl_vectoradd(&offset, origin, &wnd->bounds.pt1);
+
/* Clip to the limits of the window and of the background screen */
nxgl_rectintersect(&remaining, &bounds, &wnd->bounds);
diff --git a/nuttx/graphics/nxconsole/nxcon_internal.h b/nuttx/graphics/nxconsole/nxcon_internal.h
index 27b963d73..f5cbc9c6d 100644
--- a/nuttx/graphics/nxconsole/nxcon_internal.h
+++ b/nuttx/graphics/nxconsole/nxcon_internal.h
@@ -149,7 +149,9 @@ struct nxcon_glyph_s
uint8_t height; /* Height of this glyph (in rows) */
uint8_t width; /* Width of this glyph (in pixels) */
uint8_t stride; /* Width of the glyph row (in bytes) */
+#ifdef CONFIG_NXCONSOLE_FONTCACHE
uint8_t usecnt; /* Use count */
+#endif
FAR uint8_t *bitmap; /* Allocated bitmap memory */
};