summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-26 19:39:54 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-26 19:39:54 +0000
commitc69918b69d0997c40ab33f9d2233dd6f520508c7 (patch)
tree5654f6d0fc45599bfea74761d932c78c2b0b8bbe /nuttx
parent09b6c18505705e403b6d0f9236075d526b3071e5 (diff)
downloadpx4-nuttx-c69918b69d0997c40ab33f9d2233dd6f520508c7.tar.gz
px4-nuttx-c69918b69d0997c40ab33f9d2233dd6f520508c7.tar.bz2
px4-nuttx-c69918b69d0997c40ab33f9d2233dd6f520508c7.zip
Add another rasterizer
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1314 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/ChangeLog2
-rw-r--r--nuttx/Documentation/NuttX.html4
-rw-r--r--nuttx/graphics/Makefile11
-rw-r--r--nuttx/graphics/nxglib/Make.defs11
-rw-r--r--nuttx/graphics/nxglib/Makefile.sources17
-rw-r--r--nuttx/graphics/nxglib/nxglib_bitblit.h74
-rw-r--r--nuttx/graphics/nxglib/nxglib_fillrectangle.c6
-rw-r--r--nuttx/graphics/nxglib/nxglib_moverectangle.c126
-rw-r--r--nuttx/graphics/nxglib/nxglib_rgb2yuv.c1
-rw-r--r--nuttx/graphics/nxglib/nxglib_yuv2rgb.c1
-rw-r--r--nuttx/include/nuttx/nxglib.h86
11 files changed, 284 insertions, 55 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index a1f19142b..b75719785 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -585,3 +585,5 @@
* Added fixed precision math support
* Added some color converson routines into what may become a real graphics library someday.
* Added a framebuffer driver for the DM320 (untested on initial check-in)
+ * Network: add support for outgoing multicast addresses
+ * Added some rasterizers to the graphics library
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index f24304ccc..b752096b6 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
- <p>Last Updated: November 25, 2008</p>
+ <p>Last Updated: November 26, 2008</p>
</td>
</tr>
</table>
@@ -1221,6 +1221,8 @@ nuttx-0.3.19 2008-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
* Added fixed precision math support
* Added some color converson routines into what may become a real graphics library someday.
* Added a framebuffer driver for the DM320 (untested on initial check-in)
+ * Network: add support for outgoing multicast addresses
+ * Added some rasterizers to the graphics library
pascal-0.1.3 2008-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
diff --git a/nuttx/graphics/Makefile b/nuttx/graphics/Makefile
index fc258d997..63f1b82de 100644
--- a/nuttx/graphics/Makefile
+++ b/nuttx/graphics/Makefile
@@ -62,9 +62,10 @@ BIN = libgraphics$(LIBEXT)
VPATH = nxglib:nx
-all: $(BIN)
-.PHONY : depend clean distclean gensources gen1bppsources gen2bppsource gen4bppsource \
- gen8bppsource gen16bppsource gen24bppsource gen32bppsources
+all: mklibgraphics
+.PHONY : depend clean distclean mklibgraphics gensources gen1bppsources \
+ gen2bppsource gen4bppsource gen8bppsource gen16bppsource gen24bppsource \
+ gen32bppsources
gen1bppsources:
@make -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=1
@@ -95,11 +96,13 @@ $(AOBJS): %$(OBJEXT): %.S
$(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
-$(BIN): gensources $(OBJS)
+$(BIN): $(OBJS)
@( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
+mklibgraphics: gensources $(BIN)
+
.depend: gensources Makefile $(SRCS)
@$(MKDEP) $(DEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@touch $@
diff --git a/nuttx/graphics/nxglib/Make.defs b/nuttx/graphics/nxglib/Make.defs
index bf7c2bef8..9d7a16d8e 100644
--- a/nuttx/graphics/nxglib/Make.defs
+++ b/nuttx/graphics/nxglib/Make.defs
@@ -35,9 +35,14 @@
NXGLIB_ASRCS =
-#FILL_CSRCS1 = nxglib_fillrectangle_1bpp.c nxglib_fillrectangle_2bpp.c \
+#FILL1_CSRCS = nxglib_fillrectangle_1bpp.c nxglib_fillrectangle_2bpp.c \
# nxglib_fillrectangle_4bpp.c
-FILL_CSRCS2 = nxglib_fillrectangle_8bpp.c nxglib_fillrectangle_16bpp.c \
+FILL2_CSRCS = nxglib_fillrectangle_8bpp.c nxglib_fillrectangle_16bpp.c \
nxglib_fillrectangle_24bpp.c nxglib_fillrectangle_32bpp.c
-NXGLIB_CSRCS = nxglib_rgb2yuv.c nxglib_yuv2rgb.c $(FILL_CSRCS1) $(FILL_CSRCS2)
+#MOVE1_CSRCS = nxglib_moverectangle_1bpp.c nxglib_moverectangle_2bpp.c \
+# nxglib_moverectangle_4bpp.c
+MOVE2_CSRCS = nxglib_moverectangle_8bpp.c nxglib_moverectangle_16bpp.c \
+ nxglib_moverectangle_24bpp.c nxglib_moverectangle_32bpp.c
+NXGLIB_CSRCS = nxglib_rgb2yuv.c nxglib_yuv2rgb.c \
+ $(FILL1_CSRCS) $(FILL2_CSRCS) $(MOVE1_CSRCS) $(MOVE2_CSRCS)
diff --git a/nuttx/graphics/nxglib/Makefile.sources b/nuttx/graphics/nxglib/Makefile.sources
index 2d38547a2..a282867a1 100644
--- a/nuttx/graphics/nxglib/Makefile.sources
+++ b/nuttx/graphics/nxglib/Makefile.sources
@@ -65,8 +65,12 @@ FILL1_CSRCS = nxglib_fillrectangle_1bpp.c nxglib_fillrectangle_2bpp.c \
nxglib_fillrectangle_4bpp.c
FILL2_CSRCS = nxglib_fillrectangle_8bpp.c nxglib_fillrectangle_16bpp.c \
nxglib_fillrectangle_24bpp.c nxglib_fillrectangle_32bpp.c
+MOVE1_CSRCS = nxglib_moverectangle_1bpp.c nxglib_moverectangle_2bpp.c \
+ nxglib_moverectangle_4bpp.c
+MOVE2_CSRCS = nxglib_moverectangle_8bpp.c nxglib_moverectangle_16bpp.c \
+ nxglib_moverectangle_24bpp.c nxglib_moverectangle_32bpp.c
-GEN_CSRCS = $(FILL1_CSRCS) $(FILL2_CSRCS)
+GEN_CSRCS = $(FILL1_CSRCS) $(FILL2_CSRCS) $(MOVE1_CSRCS) $(MOVE2_CSRCS)
all: $(GEN_CSRCS)
.PHONY : clean distclean
@@ -81,9 +85,18 @@ ifneq ($(NXGLIB_BITSPERPIXEL),)
$(call PREPROCESS, nxglib_fillrectangle.c, $@)
endif
+$(MOVE1_CSRCS) : nxglib_moverectangle.c nxglib_bitblit.h
+ifneq ($(NXGLIB_BITSPERPIXEL),)
+ $(call PREPROCESS, nxglib_moverectangle.c, $@)
+endif
+
+$(MOVE2_CSRCS) : nxglib_moverectangle.c nxglib_bitblit.h
+ifneq ($(NXGLIB_BITSPERPIXEL),)
+ $(call PREPROCESS, nxglib_moverectangle.c, $@)
+endif
clean:
@rm -f *~ .*.swp
distclean: clean
- @rm -f nxglib_fillrectangle_*bpp.c
+ @rm -f nxglib_fillrectangle_*bpp.c nxglib_moverectangle_*bpp.c
diff --git a/nuttx/graphics/nxglib/nxglib_bitblit.h b/nuttx/graphics/nxglib/nxglib_bitblit.h
index b327204bd..c53e369cf 100644
--- a/nuttx/graphics/nxglib/nxglib_bitblit.h
+++ b/nuttx/graphics/nxglib/nxglib_bitblit.h
@@ -61,69 +61,69 @@
#if NXGLIB_BITSPERPIXEL == 1
-# define NX_PIXELSHIFT 3
-# define NX_PIXELMASK 7
-# define NX_MULTIPIXEL(p) ((p) ? 0xff | 0x00)
-# define NX_PIXEL_T ubyte
+# define NXGL_PIXELSHIFT 3
+# define NXGL_PIXELMASK 7
+# define NXGL_MULTIPIXEL(p) ((p) ? 0xff | 0x00)
+# define NXGL_PIXEL_T ubyte
#elif NXGLIB_BITSPERPIXEL == 2
-# define NX_PIXELSHIFT 2
-# define NX_PIXELMASK 3
-# define NX_MULTIPIXEL(p) ((ubyte)(p) << 6 | (ubyte)(p) << 4 | (ubyte)(p) << 2 | (p))
-# define NX_PIXEL_T ubyte
+# define NXGL_PIXELSHIFT 2
+# define NXGL_PIXELMASK 3
+# define NXGL_MULTIPIXEL(p) ((ubyte)(p) << 6 | (ubyte)(p) << 4 | (ubyte)(p) << 2 | (p))
+# define NXGL_PIXEL_T ubyte
#elif NXGLIB_BITSPERPIXEL == 4
-# define NX_PIXELSHIFT 1
-# define NX_PIXELMASK 1
-# define NX_MULTIPIXEL(p) ((ubyte)(p) << 4 | (p))
-# define NX_PIXEL_T ubyte
+# define NXGL_PIXELSHIFT 1
+# define NXGL_PIXELMASK 1
+# define NXGL_MULTIPIXEL(p) ((ubyte)(p) << 4 | (p))
+# define NXGL_PIXEL_T ubyte
#elif NXGLIB_BITSPERPIXEL == 8
-# define NX_SCALEX(x) (x)
-# define NX_PIXEL_T ubyte
+# define NXGL_SCALEX(x) (x)
+# define NXGL_PIXEL_T ubyte
#elif NXGLIB_BITSPERPIXEL == 16
-# define NX_SCALEX(x) ((x) << 1)
-# define NX_PIXEL_T uint16
+# define NXGL_SCALEX(x) ((x) << 1)
+# define NXGL_PIXEL_T uint16
#elif NXGLIB_BITSPERPIXEL == 24
-# define NX_SCALEX(x) (((x) << 1) + (x))
-# define NX_PIXEL_T uint32
+# define NXGL_SCALEX(x) (((x) << 1) + (x))
+# define NXGL_PIXEL_T uint32
#elif NXGLIB_BITSPERPIXEL == 32
-# define NX_SCALEX(x) ((x) << 2)
-# define NX_PIXEL_T uint32
+# define NXGL_SCALEX(x) ((x) << 2)
+# define NXGL_PIXEL_T uint32
#endif
#if NXGLIB_BITSPERPIXEL < 8
-# define NX_SCALEX(x) ((x) >> NX_PIXELSHIFT)
-# define NX_REMAINDERX(x) ((x) & NX_PIXELMASK)
-# define NX_ALIGNDOWN(x) ((x) & ~NX_PIXELMASK)
-# define NX_ALIGNUP(x) (((x) + NX_PIXELMASK) & ~NX_PIXELMASK)
-
-# ifdef CONFIG_NX_PACKEDMSFIRST
-# define NX_MASKEDSRC1(s,r) ((s) & (((ubyte)0xff) >> (8 - ((r) << pixelshift))))
-# define NX_MASKEDVALUE1(s,r) ((s) & (((ubyte)0xff) << ((r) << NX_PIXELSHFIT)))
-# define NX_MASKEDSRC2(s,r) ((s) & (((ubyte)0xff) >> ((r) << pixelshift)))
-# define NX_MASKEDVALUE2(s,r) ((s) & (((ubyte)0xff) << (8 - ((r) << NX_PIXELSHFIT))))
+# define NXGL_SCALEX(x) ((x) >> NXGL_PIXELSHIFT)
+# define NXGL_REMAINDERX(x) ((x) & NXGL_PIXELMASK)
+# define NXGL_ALIGNDOWN(x) ((x) & ~NXGL_PIXELMASK)
+# define NXGL_ALIGNUP(x) (((x) + NXGL_PIXELMASK) & ~NXGL_PIXELMASK)
+
+# ifdef CONFIG_NXGL_PACKEDMSFIRST
+# define NXGL_MASKEDSRC1(s,r) ((s) & (((ubyte)0xff) >> (8 - ((r) << pixelshift))))
+# define NXGL_MASKEDVALUE1(s,r) ((s) & (((ubyte)0xff) << ((r) << NXGL_PIXELSHFIT)))
+# define NXGL_MASKEDSRC2(s,r) ((s) & (((ubyte)0xff) >> ((r) << pixelshift)))
+# define NXGL_MASKEDVALUE2(s,r) ((s) & (((ubyte)0xff) << (8 - ((r) << NXGL_PIXELSHFIT))))
# else
-# define NX_MASKEDSRC1(s,r) ((s) & (((ubyte)0xff) >> ((r) << pixelshift)))
-# define NX_MASKEDVALUE1(s,r) ((s) & (((ubyte)0xff) << (8 - ((r) << NX_PIXELSHFIT))))
-# define NX_MASKEDSRC2(s,r) ((s) & (((ubyte)0xff) >> (8 - ((r) << pixelshift))))
-# define NX_MASKEDVALUE2(s,r) ((s) & (((ubyte)0xff) << ((r) << NX_PIXELSHFIT)))
+# define NXGL_MASKEDSRC1(s,r) ((s) & (((ubyte)0xff) >> ((r) << pixelshift)))
+# define NXGL_MASKEDVALUE1(s,r) ((s) & (((ubyte)0xff) << (8 - ((r) << NXGL_PIXELSHFIT))))
+# define NXGL_MASKEDSRC2(s,r) ((s) & (((ubyte)0xff) >> (8 - ((r) << pixelshift))))
+# define NXGL_MASKEDVALUE2(s,r) ((s) & (((ubyte)0xff) << ((r) << NXGL_PIXELSHFIT)))
# endif
# define NXGL_MEMSET(dest,value,width) \
{ \
FAR ubyte *_ptr = (FAR ubyte*)dest; \
- int nbytes = NX_SCALEX(width); \
+ int nbytes = NXGL_SCALEX(width); \
while (nbytes--) \
{ \
*_ptr++ = value; \
@@ -133,8 +133,8 @@
{ \
FAR ubyte *_dptr = (FAR ubyte*)dest; \
FAR ubyte *_sptr = (FAR ubyte*)src; \
- int nbytes = NX_SCALEX(width); \
- while (npixels--) \
+ int nbytes = NXGL_SCALEX(width); \
+ while (nbytes--) \
{ \
*_dptr++ = *_sptr++; \
} \
diff --git a/nuttx/graphics/nxglib/nxglib_fillrectangle.c b/nuttx/graphics/nxglib/nxglib_fillrectangle.c
index 3da969c4a..727c57580 100644
--- a/nuttx/graphics/nxglib/nxglib_fillrectangle.c
+++ b/nuttx/graphics/nxglib/nxglib_fillrectangle.c
@@ -74,7 +74,7 @@
****************************************************************************/
/****************************************************************************
- * Name: nxgl_fillrectangle*
+ * Name: nxgl_fillrectangle_*bpp
*
* Descripton:
* Fill a rectangle region in the framebuffer memory with a fixed color
@@ -82,7 +82,7 @@
****************************************************************************/
void NXGL_FUNCNAME(nxgl_fillrectangle,NXGLIB_SUFFIX)
-(FAR struct fb_planeinfo_s *pinfo, FAR const struct nxgl_rect_s *rect, NX_PIXEL_T color)
+(FAR struct fb_planeinfo_s *pinfo, FAR const struct nxgl_rect_s *rect, NXGL_PIXEL_T color)
{
ubyte *line;
unsigned int width;
@@ -100,7 +100,7 @@ void NXGL_FUNCNAME(nxgl_fillrectangle,NXGLIB_SUFFIX)
/* Get the address of the first byte in the first line to write */
- line = pinfo->fbmem + rect->pt1.y * stride + NX_SCALEX(rect->pt1.x);
+ line = pinfo->fbmem + rect->pt1.y * stride + NXGL_SCALEX(rect->pt1.x);
/* Then fill the rectangle line-by-line */
diff --git a/nuttx/graphics/nxglib/nxglib_moverectangle.c b/nuttx/graphics/nxglib/nxglib_moverectangle.c
new file mode 100644
index 000000000..154cf39b1
--- /dev/null
+++ b/nuttx/graphics/nxglib/nxglib_moverectangle.c
@@ -0,0 +1,126 @@
+/****************************************************************************
+ * graphics/nxglib/nxglib_moverectangle.c
+ *
+ * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <sys/types.h>
+#include <nuttx/fb.h>
+#include <nuttx/nxglib.h>
+
+#include "nxglib_bitblit.h"
+
+/****************************************************************************
+ * Pre-Processor Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Types
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: nxgl_moverectangle_*bpp
+ *
+ * Descripton:
+ * Move a rectangular region from location to another in the
+ * framebuffer memory.
+ *
+ ****************************************************************************/
+
+void NXGL_FUNCNAME(nxgl_moverectangle,NXGLIB_SUFFIX)
+(FAR struct fb_planeinfo_s *pinfo, FAR const struct nxgl_rect_s *rect,
+ FAR struct nxgl_point_s *offset)
+{
+ const ubyte *sptr;
+ ubyte *dptr;
+ unsigned int width;
+ unsigned int stride;
+ unsigned int rows;
+
+ /* Get the width of the framebuffer in bytes */
+
+ stride = pinfo->stride;
+
+ /* Get the dimensions of the rectange to fill: height in rows and width in bytes */
+
+ width = NXGL_SCALEX(rect->pt2.x - rect->pt1.x);
+ rows = rect->pt2.y - rect->pt1.y;
+
+ /* Case 1: The starting position is above the display */
+
+ if (offset->y < 0)
+ {
+ dptr = pinfo->fbmem + rect->pt1.y * stride + NXGL_SCALEX(rect->pt1.x);
+ sptr = dptr - offset->y * stride - NXGL_SCALEX(offset->x);
+
+ while (rows--)
+ {
+ NXGL_MEMCPY(dptr, sptr, width);
+ dptr += stride;
+ sptr += stride;
+ }
+ }
+ else
+ {
+ dptr = pinfo->fbmem + rect->pt2.y * stride + NXGL_SCALEX(rect->pt1.x);
+ sptr = dptr - offset->y * stride - NXGL_SCALEX(offset->x);
+
+ while (rows--)
+ {
+ dptr -= stride;
+ sptr -= stride;
+ NXGL_MEMCPY(dptr, sptr, width);
+ }
+ }
+}
diff --git a/nuttx/graphics/nxglib/nxglib_rgb2yuv.c b/nuttx/graphics/nxglib/nxglib_rgb2yuv.c
index fca2082e2..49a29ca67 100644
--- a/nuttx/graphics/nxglib/nxglib_rgb2yuv.c
+++ b/nuttx/graphics/nxglib/nxglib_rgb2yuv.c
@@ -85,7 +85,6 @@
* Description:
* Convert 8-bit RGB triplet to 8-bit YUV triplet
*
- *
****************************************************************************/
void nxgl_rgb2yuv(ubyte r, ubyte g, ubyte b, ubyte *y, ubyte *u, ubyte *v)
diff --git a/nuttx/graphics/nxglib/nxglib_yuv2rgb.c b/nuttx/graphics/nxglib/nxglib_yuv2rgb.c
index 18c16dd91..72002d8af 100644
--- a/nuttx/graphics/nxglib/nxglib_yuv2rgb.c
+++ b/nuttx/graphics/nxglib/nxglib_yuv2rgb.c
@@ -81,7 +81,6 @@
* Description:
* Convert 8-bit RGB triplet to 8-bit YUV triplet
*
- *
****************************************************************************/
void nxgl_yuv2rgb(ubyte y, ubyte u, ubyte v, ubyte *r, ubyte *g, ubyte *b)
diff --git a/nuttx/include/nuttx/nxglib.h b/nuttx/include/nuttx/nxglib.h
index b9269ed52..a7abe89df 100644
--- a/nuttx/include/nuttx/nxglib.h
+++ b/nuttx/include/nuttx/nxglib.h
@@ -68,8 +68,8 @@ struct nxgl_point_s
struct nxgl_rect_s
{
- struct nxgl_point_t pt1; /* Upper, left-hand corner */
- struct nxgl_point_t pt2; /* Lower, right-hand corner */
+ struct nxgl_point_s pt1; /* Upper, left-hand corner */
+ struct nxgl_point_s pt2; /* Lower, right-hand corner */
};
/****************************************************************************
@@ -88,11 +88,91 @@ extern "C" {
* Public Function Prototypes
****************************************************************************/
-/* Color conversons */
+/* Color conversons *********************************************************/
+
+/****************************************************************************
+ * Name: nxgl_rgb2yuv
+ *
+ * Description:
+ * Convert 8-bit RGB triplet to 8-bit YUV triplet
+ *
+ ****************************************************************************/
EXTERN void nxgl_rgb2yuv(ubyte r, ubyte g, ubyte b, ubyte *y, ubyte *u, ubyte *v);
+
+/****************************************************************************
+ * Name: nxgl_yuv2rgb
+ *
+ * Description:
+ * Convert 8-bit RGB triplet to 8-bit YUV triplet
+ *
+ ****************************************************************************/
+
EXTERN void nxgl_yuv2rgb(ubyte y, ubyte u, ubyte v, ubyte *r, ubyte *g, ubyte *b);
+/* Rasterizers **************************************************************/
+
+/****************************************************************************
+ * Name: nxgl_fillrectangle_*bpp
+ *
+ * Descripton:
+ * Fill a rectangle region in the framebuffer memory with a fixed color
+ *
+ ****************************************************************************/
+
+EXTERN void nxgl_fillrectangle_1bpp(FAR struct fb_planeinfo_s *pinfo,
+ FAR const struct nxgl_rect_s *rect,
+ ubyte color);
+EXTERN void nxgl_fillrectangle_2bpp(FAR struct fb_planeinfo_s *pinfo,
+ FAR const struct nxgl_rect_s *rect,
+ ubyte color);
+EXTERN void nxgl_fillrectangle_4bpp(FAR struct fb_planeinfo_s *pinfo,
+ FAR const struct nxgl_rect_s *rect,
+ ubyte color);
+EXTERN void nxgl_fillrectangle_8bpp(FAR struct fb_planeinfo_s *pinfo,
+ FAR const struct nxgl_rect_s *rect,
+ ubyte color);
+EXTERN void nxgl_fillrectangle_16bpp(FAR struct fb_planeinfo_s *pinfo,
+ FAR const struct nxgl_rect_s *rect,
+ uint16 color);
+EXTERN void nxgl_fillrectangle_24bpp(FAR struct fb_planeinfo_s *pinfo,
+ FAR const struct nxgl_rect_s *rect,
+ uint32 color);
+EXTERN void nxgl_fillrectangle_32bpp(FAR struct fb_planeinfo_s *pinfo,
+ FAR const struct nxgl_rect_s *rect,
+ uint32 color);
+
+/****************************************************************************
+ * Name: nxgl_moverectangle_*bpp
+ *
+ * Descripton:
+ * Move a rectangular region from location to another in the
+ * framebuffer memory.
+ *
+ ****************************************************************************/
+
+EXTERN void nxgl_moverectangle_1bpp(FAR struct fb_planeinfo_s *pinfo,
+ FAR const struct nxgl_rect_s *rect,
+ FAR struct nxgl_point_s *offset);
+EXTERN void nxgl_moverectangle_2bpp(FAR struct fb_planeinfo_s *pinfo,
+ FAR const struct nxgl_rect_s *rect,
+ FAR struct nxgl_point_s *offset);
+EXTERN void nxgl_moverectangle_4bpp(FAR struct fb_planeinfo_s *pinfo,
+ FAR const struct nxgl_rect_s *rect,
+ FAR struct nxgl_point_s *offset);
+EXTERN void nxgl_moverectangle_8bpp(FAR struct fb_planeinfo_s *pinfo,
+ FAR const struct nxgl_rect_s *rect,
+ FAR struct nxgl_point_s *offset);
+EXTERN void nxgl_moverectangle_16bpp(FAR struct fb_planeinfo_s *pinfo,
+ FAR const struct nxgl_rect_s *rect,
+ FAR struct nxgl_point_s *offset);
+EXTERN void nxgl_moverectangle_24bpp(FAR struct fb_planeinfo_s *pinfo,
+ FAR const struct nxgl_rect_s *rect,
+ FAR struct nxgl_point_s *offset);
+EXTERN void nxgl_moverectangle_32bpp(FAR struct fb_planeinfo_s *pinfo,
+ FAR const struct nxgl_rect_s *rect,
+ FAR struct nxgl_point_s *offset);
+
#undef EXTERN
#if defined(__cplusplus)
}