From dbf37c63155c29346d8cbc65aa287fa866ba0b7e Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 22 Oct 2011 18:13:04 +0000 Subject: [PATCH] Add logic to read from graphics memory git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4057 42af7a65-404d-4744-a932-0658087f49c3 --- ChangeLog | 3 + Documentation/NXGraphicsSubsystem.html | 237 +++++++++++++++++----- graphics/nxbe/Make.defs | 14 +- graphics/nxbe/nxbe.h | 29 +++ graphics/nxbe/nxbe_configure.c | 7 + graphics/nxbe/nxbe_getrectangle.c | 149 ++++++++++++++ graphics/nxglib/Make.defs | 16 +- graphics/nxglib/Makefile.sources | 23 ++- graphics/nxglib/fb/nxglib_getrectangle.c | 201 ++++++++++++++++++ graphics/nxglib/fb/nxglib_setpixel.c | 2 +- graphics/nxglib/lcd/nxglib_getrectangle.c | 105 ++++++++++ graphics/nxglib/lcd/nxglib_setpixel.c | 2 +- graphics/nxmu/Make.defs | 2 +- graphics/nxmu/nx_getrectangle.c | 137 +++++++++++++ graphics/nxmu/nxfe.h | 13 ++ graphics/nxmu/nxmu_server.c | 7 + graphics/nxsu/Make.defs | 2 +- graphics/nxsu/nx_getrectangle.c | 108 ++++++++++ graphics/nxtk/Make.defs | 14 +- graphics/nxtk/nxtk_gettoolbar.c | 122 +++++++++++ graphics/nxtk/nxtk_getwindow.c | 122 +++++++++++ include/nuttx/nx/nx.h | 29 +++ include/nuttx/nx/nxglib.h | 37 +++- include/nuttx/nx/nxtk.h | 52 ++++- 24 files changed, 1354 insertions(+), 79 deletions(-) create mode 100644 graphics/nxbe/nxbe_getrectangle.c create mode 100644 graphics/nxglib/fb/nxglib_getrectangle.c create mode 100644 graphics/nxglib/lcd/nxglib_getrectangle.c create mode 100644 graphics/nxmu/nx_getrectangle.c create mode 100644 graphics/nxsu/nx_getrectangle.c create mode 100644 graphics/nxtk/nxtk_gettoolbar.c create mode 100644 graphics/nxtk/nxtk_getwindow.c diff --git a/ChangeLog b/ChangeLog index be0d29dc7a..2d1e08bd3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2167,4 +2167,7 @@ support for the Sure Electronics PIC32MX board. * configs/ea3152: Add a configuration for the Embedded Artists LPC3152 daughter board (with the same base-board used with configs/ea3131) + * graphics/nxmu/nx_getrectangle.c, graphics/nxsu/nx_getrectangle.c, + graphics/mxtk/nx_getwindow.c, graphics/nxmu/nx_gettoobar.c: New + interfaces to read from graphics memory diff --git a/Documentation/NXGraphicsSubsystem.html b/Documentation/NXGraphicsSubsystem.html index 6c3ccf7bba..3a99eb1e11 100644 --- a/Documentation/NXGraphicsSubsystem.html +++ b/Documentation/NXGraphicsSubsystem.html @@ -12,7 +12,7 @@

NX Graphics Subsystem

-

Last Updated: September 28, 2011

+

Last Updated: October 22, 2011

@@ -115,15 +115,16 @@ 2.3.18 nx_raise()
2.3.19 nx_lower()
2.3.20 nx_fill()
- 2.3.21 nx_filltrapezoid()
- 2.3.22 nx_drawline()
- 2.3.23 nx_drawcircle()
- 2.3.24 nx_fillcircle()
- 2.3.25 nx_setbgcolor()
- 2.3.26 nx_move()
- 2.3.27 nx_bitmap()
- 2.3.28 nx_kbdin()
- 2.3.29 nx_mousein()
+ 2.3.21 nx_getrectangle()
+ 2.3.22 nx_filltrapezoid()
+ 2.3.23 nx_drawline()
+ 2.3.24 nx_drawcircle()
+ 2.3.25 nx_fillcircle()
+ 2.3.26 nx_setbgcolor()
+ 2.3.27 nx_move()
+ 2.3.28 nx_bitmap()
+ 2.3.29 nx_kbdin()
+ 2.3.30 nx_mousein()

@@ -142,21 +143,23 @@ 2.4.7 nxtk_raise()
2.4.8 nxtk_lower()
2.4.9 nxtk_fillwindow()
- 2.4.10 nxtk_filltrapwindow()
- 2.4.11 nxtk_drawlinewindow()
- 2.4.12 nxtk_drawcirclewindow()
- 2.4.13 nxtk_fillcirclewindow()
- 2.4.14 nxtk_movewindow()
- 2.4.15 nxtk_bitmapwindow()
- 2.4.16 nxtk_opentoolbar()
- 2.4.17 nxtk_closetoolbar()
- 2.4.18 nxtk_filltoolbar()
- 2.4.19 nxtk_filltraptoolbar()
- 2.4.20 nxtk_drawlinetoolbar()
- 2.4.21 nxtk_drawcircletoolbar()
- 2.4.22 nxtk_fillcircletoolbar()
- 2.4.23 nxtk_movetoolbar()
- 2.4.24 nxtk_bitmaptoolbar() + 2.4.10 nxtk_getwindow()
+ 2.4.11 nxtk_filltrapwindow()
+ 2.4.12 nxtk_drawlinewindow()
+ 2.4.13 nxtk_drawcirclewindow()
+ 2.4.14 nxtk_fillcirclewindow()
+ 2.4.15 nxtk_movewindow()
+ 2.4.16 nxtk_bitmapwindow()
+ 2.4.17 nxtk_opentoolbar()
+ 2.4.18 nxtk_closetoolbar()
+ 2.4.19 nxtk_filltoolbar()
+ 2.4.20 nxtk_gettoolbar()
+ 2.4.21 nxtk_filltraptoolbar()
+ 2.4.22 nxtk_drawlinetoolbar()
+ 2.4.23 nxtk_drawcircletoolbar()
+ 2.4.24 nxtk_fillcircletoolbar()
+ 2.4.25 nxtk_movetoolbar()
+ 2.4.26 nxtk_bitmaptoolbar()

@@ -1674,7 +1677,47 @@ int nx_fill(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, ERROR on failure with errno set appropriately

-

2.3.21 nx_filltrapezoid()

+

2.3.21 nx_getrectangle()

+

Function Prototype:

+ +

+ Description: + Get the raw contents of graphic memory within a rectangular region. NOTE: + Since raw graphic memory is returned, the returned memory content may be + the memory of windows above this one and may not necessarily belong to + this window unless you assure that this is the top window. +

+

+ Input Parameters: +

+

+

+ Returned Value: + OK on success; + ERROR on failure with errno set appropriately +

+ +

2.3.22 nx_filltrapezoid()

Function Prototype: