r5313 vince - in /branches/vince/netsurf-fb/framebuffer: fb_16bpp_plotters.c fb_1bpp_plotters.c fb_32bpp_plotters.c fb_8bpp_plotters.c fb_font.c fb_font.h fb_gui.c fb_gui.h fb_plotters.c fb_plotters.h font_8x16.c utf8.c

netsurf at semichrome.net netsurf at semichrome.net
Sun Sep 14 15:08:53 BST 2008


Author: vince
Date: Sun Sep 14 09:08:52 2008
New Revision: 5313

URL: http://source.netsurf-browser.org?rev=5313&view=rev
Log:
add line plotters

Removed:
    branches/vince/netsurf-fb/framebuffer/utf8.c
Modified:
    branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c
    branches/vince/netsurf-fb/framebuffer/fb_1bpp_plotters.c
    branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c
    branches/vince/netsurf-fb/framebuffer/fb_8bpp_plotters.c
    branches/vince/netsurf-fb/framebuffer/fb_font.c
    branches/vince/netsurf-fb/framebuffer/fb_font.h
    branches/vince/netsurf-fb/framebuffer/fb_gui.c
    branches/vince/netsurf-fb/framebuffer/fb_gui.h
    branches/vince/netsurf-fb/framebuffer/fb_plotters.c
    branches/vince/netsurf-fb/framebuffer/fb_plotters.h
    branches/vince/netsurf-fb/framebuffer/font_8x16.c

Modified: branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c?rev=5313&r1=5312&r2=5313&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c Sun Sep 14 09:08:52 2008
@@ -21,12 +21,13 @@
 #include <limits.h>
 #include <able/fb.h>
 
+#include "utils/log.h"
+
 #include "framebuffer/fb_plotters.h"
 #include "framebuffer/fb_gui.h"
 #include "framebuffer/fb_bitmap.h"
 #include "framebuffer/fb_font.h"
 
-#include "utils/log.h"
 
 extern struct gui_window *current_window;
 
@@ -44,12 +45,18 @@
 	return true;
 }
 
+#define SIGN(x)  ((x<0) ?  -1  :  ((x>0) ? 1 : 0))
+
 static bool fb_16bpp_line(int x0, int y0, int x1, int y1, int width,
 			colour c, bool dotted, bool dashed)
 {
         int w;
         uint16_t ent;
-        uint16_t *video_char_start;
+        uint16_t *pvideo;
+
+        int x, y, i;
+        int dx, dy, sdy;
+        int dxabs, dyabs;
 
         LOG(("%d, %d, %d, %d, %d, 0x%lx, %d, %d",
              x0,y0,x1,y1,width,c,dotted,dashed));
@@ -70,16 +77,65 @@
                 if (x1 > fb_plot_ctx.x1)
                         x1 = fb_plot_ctx.x1;
 
-        LOG(("horiz: %d, %d, %d, %d, %d, 0x%lx, %d, %d",
-             x0,y0,x1,y1,width,c,dotted,dashed));
-
-                video_char_start = fb_16bpp_get_xy_loc(x0, y0, current_window);
+                LOG(("horiz: %d, %d, %d, %d, %d, 0x%lx, %d, %d",
+                     x0,y0,x1,y1,width,c,dotted,dashed));
+
+                pvideo = fb_16bpp_get_xy_loc(x0, y0, current_window);
 
                 w = x1 - x0;
                 while (w-- > 0) {
-                        *(video_char_start + w) = ent;
-                }
-                return true;
+                        *(pvideo + w) = ent;
+                }
+                return true;
+        } else {
+                /* standard bresenham line */
+                if (!fb_plotters_clip_line_ctx(&x0, &y0, &x1, &y1))
+                        return true; /* line outside clipping */
+
+                /* the horizontal distance of the line */
+                dx = x1 - x0;
+                dxabs = abs (dx);
+
+                /* the vertical distance of the line */
+                dy = y1 - y0;
+                dyabs = abs (dy);
+
+                sdy = dx ? SIGN(dy) * SIGN(dx) : SIGN(dy);
+
+                if (dx >= 0)
+                        pvideo = fb_16bpp_get_xy_loc(x0, y0, current_window);
+                else
+                        pvideo = fb_16bpp_get_xy_loc(x1, y1, current_window);
+
+                x = dyabs >> 1;
+                y = dxabs >> 1;
+
+                if (dxabs >= dyabs) { 
+                        /* the line is more horizontal than vertical */
+                        for (i = 0; i <= dxabs; i++) {
+                                *pvideo = ent;
+
+                                pvideo++;
+                                y += dyabs;
+                                if (y >= dxabs) {
+                                        y -= dxabs;
+                                        pvideo += sdy * (current_window->linelen>>1);
+                                }
+                        }
+                } else {
+                        /* the line is more vertical than horizontal */
+                        for (i = 0; i <= dyabs; i++) {
+                                *pvideo = ent;
+                                pvideo += sdy * (current_window->linelen >> 1);
+
+                                x += dxabs;
+                                if (x >= dyabs) {
+                                        x -= dyabs;
+                                        pvideo++;
+                                }
+                        }
+                }
+                
         }
 
 
@@ -89,7 +145,14 @@
 
 static bool fb_16bpp_polygon(int *p, unsigned int n, colour fill)
 {
+        int pnt;
+        int *cur;
         LOG(("p %p, n %d, fill 0x%lx", p, n, fill));
+        
+        for (pnt = 1; pnt < n; pnt++) {
+                cur = p + (pnt << 1);
+                fb_16bpp_line(cur[-2], cur[-1], cur[0], cur[1], 1, fill, false, false);
+        }
 	return true;
 }
 
@@ -99,24 +162,24 @@
         int w;
         int y;
         uint16_t ent;
-        uint16_t *video_char_start;
+        uint16_t *pvideo;
 
         LOG(("x0 %d, y0 %d, x1 %d, y1 %d, c 0x%lx", x0, y0, x1, y1, c));
 
-        fb_plotters_clip_rect(&x0, &y0, &x1, &y1);
+        fb_plotters_clip_rect_ctx(&x0, &y0, &x1, &y1);
 
         ent = ((c & 0xF8) << 8) |
               ((c & 0xFC00 ) >> 5) |
               ((c & 0xF80000) >> 19);
 
-        video_char_start = fb_16bpp_get_xy_loc(x0, y0, current_window);
+        pvideo = fb_16bpp_get_xy_loc(x0, y0, current_window);
 
         for (y = y0; y < y1; y++) {
                 w = x1 - x0;
                 while (w-- > 0) {
-                        *(video_char_start + w) = ent;
-                }
-                video_char_start += (current_window->linelen >> 1);
+                        *(pvideo + w) = ent;
+                }
+                pvideo += (current_window->linelen >> 1);
         }
 
 	return true;
@@ -147,6 +210,8 @@
         uint16_t fgcol;
         uint16_t bgcol;
 
+	char *buffer = NULL;
+
         if (y > fb_plot_ctx.y1)
                 return true;
 
@@ -158,6 +223,12 @@
 
         if (x < fb_plot_ctx.x0)
                 return true;
+
+	utf8_to_local_encoding(text, length, &buffer);
+	if (!buffer) 
+                return true;
+
+        length = strlen(buffer);
 
         /* y is given to the fonts baseline we need it to the fonts top */
         y-=(fb_font->height * 75)/100;
@@ -178,7 +249,7 @@
                 pvideo = fb_16bpp_get_xy_loc(x + (chr * (fb_font->width)), y, current_window);
 
                 /* move our font-data to the correct position */
-                font_data = fb_font->data + (text[chr] * fb_font->height);
+                font_data = fb_font->data + (buffer[chr] * fb_font->height);
 
                 for (yloop = 0; yloop < fb_font->height; yloop++) {
                         row = font_data[yloop];
@@ -191,6 +262,8 @@
                 }
 
         }
+
+	free(buffer);
 	return true;
 }
 
@@ -264,7 +337,7 @@
 
 	for (xf = 0; xf < width; xf += bitmap->width) {
 		for (yf = 0; yf < height; yf += bitmap->height) {
-			if (width > xf + bitmap->width) {
+			if (width > (xf + bitmap->width)) {
 				wf = width - (xf + bitmap->width);
                                 LOG(("wf %d, width %d, xf %d, bitmap width %d",
                                      wf, width, xf, bitmap->width));
@@ -274,8 +347,8 @@
                                      wf, bitmap->width));
 			}
 
-			if (height > yf+bitmap->height) {
-				hf = height-(yf+bitmap->height);
+			if (height > (yf + bitmap->height)) {
+				hf = height - (yf + bitmap->height);
 			} else {
 				hf=bitmap->height;
 			}

Modified: branches/vince/netsurf-fb/framebuffer/fb_1bpp_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_1bpp_plotters.c?rev=5313&r1=5312&r2=5313&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_1bpp_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_1bpp_plotters.c Sun Sep 14 09:08:52 2008
@@ -69,7 +69,7 @@
         else
                 pent = 0;
 
-        fb_plotters_clip_rect(&x0, &y0, &x1, &y1);
+        fb_plotters_clip_rect_ctx(&x0, &y0, &x1, &y1);
      
         x = x1 - x0;
         for (y = y0; y < y1; y++) {
@@ -96,12 +96,8 @@
         const struct fb_font_desc* fb_font = fb_get_font(style);
         u8_t *video_char_start;
         const u8_t *font_data;
-        int xloop, yloop;
+        int yloop;
         unsigned char row;
-        unsigned char * lut;
-        argb_t *bitc;
-        int fg_pent;
-        int bg_pent;
         int chr;
 
         LOG(("%s(%d, %d, %p, %.*s , %d, 0x%lx, 0x%lx)\n", __func__, 
@@ -150,7 +146,7 @@
 static bool fb_1bpp_arc(int x, int y, int radius, int angle1, int angle2,
 	    		colour c)
 {
-        LOG(("%s(%d, %d, %d,, %d, %d, 0x%lx, %d)\n", __func__, 
+        LOG(("x %d, y %d, radius %d, angle1 %d, angle2 %d, c 0x%lx",
              x, y, radius, angle1, angle2, c));
 	return true;
 }
@@ -229,20 +225,6 @@
 	}
 
 	return true;
-}
-
-static bool fb_1bpp_group_start(const char *name)
-{
-        LOG(("%s(%s)\n", __func__, name));
-	/** optional */
-	return false;
-}
-
-static bool fb_1bpp_group_end(void)
-{
-        LOG(("%s()\n", __func__));
-	/** optional */
-	return false;
 }
 
 static bool fb_1bpp_flush(void)

Modified: branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c?rev=5313&r1=5312&r2=5313&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c Sun Sep 14 09:08:52 2008
@@ -74,7 +74,7 @@
         LOG(("%s(%d, %d, %d, %d, 0x%lx)\n", __func__, 
              x0,y0,x1,y1,c));
 
-        fb_plotters_clip_rect(&x0, &y0, &x1, &y1);
+        fb_plotters_clip_rect_ctx(&x0, &y0, &x1, &y1);
 
         ent = ((c & 0xff0000) >> 16) | (c & 0xff00) | ((c & 0xff) << 16);
 

Modified: branches/vince/netsurf-fb/framebuffer/fb_8bpp_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_8bpp_plotters.c?rev=5313&r1=5312&r2=5313&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_8bpp_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_8bpp_plotters.c Sun Sep 14 09:08:52 2008
@@ -119,7 +119,7 @@
 
         LOG(("%d, %d, %d, %d, 0x%lx", x0, y0, x1, y1, c));
 
-        fb_plotters_clip_rect(&x0, &y0, &x1, &y1);
+        fb_plotters_clip_rect_ctx(&x0, &y0, &x1, &y1);
 
         pvideo = fb_8bpp_get_xy_loc(x0, y0, current_window);
 

Modified: branches/vince/netsurf-fb/framebuffer/fb_font.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_font.c?rev=5313&r1=5312&r2=5313&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_font.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_font.c Sun Sep 14 09:08:52 2008
@@ -23,11 +23,19 @@
 #include "framebuffer/fb_gui.h"
 #include "framebuffer/fb_font.h"
 #include "desktop/options.h"
+#include "utils/utf8.h"
 
 const struct fb_font_desc*
 fb_get_font(const struct css_style *style)
 {
         return &font_vga_8x16;
+}
+
+utf8_convert_ret utf8_to_local_encoding(const char *string, size_t len,
+	char **result)
+{
+	return utf8_to_enc(string, "ASCII", len, result);
+
 }
 
 static bool nsfont_width(const struct css_style *style,

Modified: branches/vince/netsurf-fb/framebuffer/fb_font.h
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_font.h?rev=5313&r1=5312&r2=5313&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_font.h (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_font.h Sun Sep 14 09:08:52 2008
@@ -9,3 +9,4 @@
 extern const struct fb_font_desc font_vga_8x16;
 
 const struct fb_font_desc* fb_get_font(const struct css_style *style);
+

Modified: branches/vince/netsurf-fb/framebuffer/fb_gui.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_gui.c?rev=5313&r1=5312&r2=5313&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_gui.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_gui.c Sun Sep 14 09:08:52 2008
@@ -211,9 +211,9 @@
                                              bool new_tab)
 {
         struct gui_window *g;
-        LOG(("%s(%p, %p)", __func__, bw, clone));
-
-        g = calloc(1,sizeof(struct gui_window));
+        LOG(("bw %p, clone %p", bw, clone));
+
+        g = calloc(1, sizeof(struct gui_window));
         if (g == NULL)
                 return NULL;
 
@@ -223,8 +223,6 @@
         g->linelen = fbinfo->line_len;
         g->bw = bw;
 
-        current_window = g;
-
         return g;
 }
 
@@ -251,6 +249,7 @@
 
 	if (!g) return;
 
+        current_window = g;
 	g->redraw_required = true;
 }
 

Modified: branches/vince/netsurf-fb/framebuffer/fb_gui.h
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_gui.h?rev=5313&r1=5312&r2=5313&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_gui.h (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_gui.h Sun Sep 14 09:08:52 2008
@@ -17,12 +17,15 @@
  */
 
 struct gui_window {
-    int width;
-    int height;
+    int x;
+    int y;
+    int width; /**< Window width */
+    int height; /**< window height */
+
     u8_t *ptr; /**< Base of video memory for this window. */
     int linelen; /**< length of a video line. */
 
-    int scrolly;
-    bool redraw_required;
-    struct browser_window *bw;
+    int scrolly; /**< y scroll offset */
+    bool redraw_required; /**< flag indicating the foreground loop needs to redraw the window */
+    struct browser_window *bw; /* The browser window connected to this gui window */
 };

Modified: branches/vince/netsurf-fb/framebuffer/fb_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_plotters.c?rev=5313&r1=5312&r2=5313&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_plotters.c Sun Sep 14 09:08:52 2008
@@ -21,12 +21,14 @@
 #include <limits.h>
 #include <able/fb.h>
 
+#include "utils/utf8.h"
+#include "utils/log.h"
+
 #include "framebuffer/fb_plotters.h"
 #include "framebuffer/fb_gui.h"
 #include "framebuffer/fb_bitmap.h"
 #include "framebuffer/fb_font.h"
 
-#include "utils/log.h"
 
 extern struct fb_info_s *fbinfo;
 
@@ -34,31 +36,122 @@
 struct plotter_table plot;
 
 /* Current plotting context */
-struct plot_ctx fb_plot_ctx;
+bbox_t fb_plot_ctx;
 
-void fb_plotters_clip_rect(int *x0, int *y0, int *x1, int *y1)
+bool fb_plotters_clip_rect(const bbox_t *clip, 
+                           int *x0, int *y0, int *x1, int *y1)
 {
-        if (*x0 < fb_plot_ctx.x0)
-                *x0 = fb_plot_ctx.x0;
-        if (*x0 > fb_plot_ctx.x1)
-                *x0 = fb_plot_ctx.x1;
+        if (*x0 < clip->x0)
+                *x0 = clip->x0;
+        if (*x0 > clip->x1)
+                *x0 = clip->x1;
 
-        if (*x1 < fb_plot_ctx.x0)
-                *x1 = fb_plot_ctx.x0;
-        if (*x1 > fb_plot_ctx.x1)
-                *x1 = fb_plot_ctx.x1;
+        if (*x1 < clip->x0)
+                *x1 = clip->x0;
+        if (*x1 > clip->x1)
+                *x1 = clip->x1;
 
-        if (*y0 < fb_plot_ctx.y0)
-                *y0 = fb_plot_ctx.y0;
-        if (*y0 > fb_plot_ctx.y1)
-                *y0 = fb_plot_ctx.y1;
+        if (*y0 < clip->y0)
+                *y0 = clip->y0;
+        if (*y0 > clip->y1)
+                *y0 = clip->y1;
 
-        if (*y1 < fb_plot_ctx.y0)
-                *y1 = fb_plot_ctx.y0;
-        if (*y1 > fb_plot_ctx.y1)
-                *y1 = fb_plot_ctx.y1;
+        if (*y1 < clip->y0)
+                *y1 = clip->y0;
+        if (*y1 > clip->y1)
+                *y1 = clip->y1;
+
+        return true;
 }
 
+bool fb_plotters_clip_rect_ctx(int *x0, int *y0, int *x1, int *y1)
+{
+        return fb_plotters_clip_rect(&fb_plot_ctx, x0, y0, x1, y1);
+}
+
+/** Clip a line to a bounding box.
+ */
+bool fb_plotters_clip_line(const bbox_t *clip, 
+                           int *x0, int *y0, int *x1, int *y1)
+{
+#define REGION(x,y,cx1,cx2,cy1,cy2) ( ( (y) > (cy2) ? 8 : 0) |  \
+                                      ( (y) < (cy1) ? 4 : 0) |  \
+                                      ( (x) > (cx2) ? 2 : 0) |  \
+                                      ( (x) < (cx1) ? 1 : 0) )
+
+        char region1 = REGION(*x0, *y0,
+                               clip->x0, clip->x1, clip->y0, clip->y1);
+        char region2 = REGION(*x1, *y1,
+                               clip->x0, clip->x1, clip->y0, clip->y1);
+
+        while (region1 | region2) {
+                if (region1 & region2) {
+                        /* line lies entirely outside the clipping rectangle */
+                        return false;  
+                }
+
+                if (region1) {
+                        /* first point */
+                        if (region1 & 8) { 
+                                /* divide line at bottom */
+                                *x0 = (*x0 + (*x1-*x0) *
+                                       (clip->y1 - *y0) / (*y1-*y0));
+                                *y0 = clip->y1;
+                        } else if (region1 & 4) { 
+                                /* divide line at top */
+                                *x0 = (*x0 + (*x1-*x0) *
+                                       (clip->y0 - *y0) / (*y1-*y0));
+                                *y0 = clip->y0;
+                        } else if (region1 & 2) { 
+                                /* divide line at right */
+                                *y0 = (*y0 +(*y1-*y0) *
+                                       (clip->x1 - *x0) / (*x1-*x0));
+                                *x0 = clip->x1;
+                        } else if (region1 & 1) { 
+                                /* divide line at right */
+                                *y0 = (*y0 +(*y1-*y0) *
+                                       (clip->x0 - *x0) / (*x1-*x0));
+                                *x0 = clip->x0;
+                        }
+
+                        region1 = REGION(*x0, *y0,
+                                         clip->x0, clip->x1, clip->y0, clip->y1);
+                } else {
+                        /* second point */
+                        if (region2 & 8) {  
+                                /* divide line at bottom*/
+                                *x1 = (*x0 + (*x1-*x0) *
+                                       (clip->y1 - *y0) / (*y1-*y0));
+                                *y1 = clip->y1;
+                        } else if (region2 & 4) { 
+                                /* divide line at top*/
+                                *x1 = (*x0 +(*x1-*x0) *
+                                       (clip->y0 - *y0) / (*y1-*y0));
+                                *y1 = clip->y0;
+                        } else if (region2 & 2) { 
+                                /* divide line at right*/
+                                *y1 = (*y0 +(*y1-*y0) *
+                                       (clip->x1 - *x0) / (*x1 - *x0));
+                                *x1 = clip->x1;
+                        } else if (region2 & 1) { 
+                                /* divide line at right*/
+                                *y1 = (*y0 +(*y1-*y0) *
+                                       (clip->x0 - *x0) / (*x1 - *x0));
+                                *x1 = clip->x0;
+                        }
+
+                        region2 = REGION(*x1, *y1,
+                                         clip->x0, clip->x1, clip->y0, clip->y1);
+                }
+        }
+
+        return true;
+}
+
+bool fb_plotters_clip_line_ctx(int *x0, int *y0, int *x1, int *y1)
+{
+        return fb_plotters_clip_line(&fb_plot_ctx, x0, y0, x1, y1);
+}
 
 u8_t *
 fb_plotters_get_y_loc(int y, fb_info_t *parms)

Modified: branches/vince/netsurf-fb/framebuffer/fb_plotters.h
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_plotters.h?rev=5313&r1=5312&r2=5313&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_plotters.h (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_plotters.h Sun Sep 14 09:08:52 2008
@@ -20,13 +20,13 @@
 #define FRAMEBUFFER_PLOTTERS_H
 #include "desktop/plotters.h"
 
-/* framebuffer plotting context */
-struct plot_ctx {
+/* framebuffer bounding box */
+typedef struct bbox_s {
         int x0;
         int y0;
         int x1;
         int y1;
-};
+} bbox_t;
 
 extern const struct plotter_table framebuffer_1bpp_plot;
 extern const struct plotter_table framebuffer_8bpp_plot;
@@ -34,10 +34,15 @@
 extern const struct plotter_table framebuffer_32bpp_plot;
 
 /* plotting context */
-extern struct plot_ctx fb_plot_ctx;
+extern bbox_t fb_plot_ctx;
 
 /* plotter support functions */
-void fb_plotters_clip_rect(int *x0, int *y0, int *x1, int *y1);
+bool fb_plotters_clip_rect_ctx(int *x0, int *y0, int *x1, int *y1);
+bool fb_plotters_clip_rect(const bbox_t *clip, int *x0, int *y0, int *x1, int *y1);
+
+bool fb_plotters_clip_line_ctx(int *x0, int *y0, int *x1, int *y1);
+bool fb_plotters_clip_line(const bbox_t *clip, int *x0, int *y0, int *x1, int *y1);
+
 u8_t *fb_plotters_get_y_loc(int y, fb_info_t *parms);
 u8_t *fb_plotters_get_xy_loc(int x, int y, fb_info_t *parms);
 colour fb_plotters_ablend(colour pixel, colour scrpixel);

Modified: branches/vince/netsurf-fb/framebuffer/font_8x16.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/font_8x16.c?rev=5313&r1=5312&r2=5313&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/font_8x16.c (original)
+++ branches/vince/netsurf-fb/framebuffer/font_8x16.c Sun Sep 14 09:08:52 2008
@@ -9,7 +9,7 @@
 
 #define FONTDATAMAX 4096
 
-const static unsigned char fontdata_8x16[FONTDATAMAX] = {
+static const unsigned char fontdata_8x16[FONTDATAMAX] = {
 
 	/* 0 0x00 '^@' */
 	0x00, /* 00000000 */

Removed: branches/vince/netsurf-fb/framebuffer/utf8.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/utf8.c?rev=5312&view=auto
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/utf8.c (original)
+++ branches/vince/netsurf-fb/framebuffer/utf8.c (removed)
@@ -1,25 +1,0 @@
-/*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <sys/types.h>
-#include "utils/utf8.h"
-
-utf8_convert_ret utf8_to_local_encoding(const char *string, size_t len,
-	char **result)
-{
-}




More information about the netsurf-commits mailing list