Author: mono
Date: Tue Mar 1 13:29:40 2011
New Revision: 11875
URL:
http://source.netsurf-browser.org?rev=11875&view=rev
Log:
Adjusted clipping rect changes for atari fronted.
Modified:
trunk/netsurf/atari/plot/plotter.c
trunk/netsurf/atari/plot/plotter.h
trunk/netsurf/atari/plot/plotter_vdi.c
Modified: trunk/netsurf/atari/plot/plotter.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/atari/plot/plotter.c?rev=...
==============================================================================
--- trunk/netsurf/atari/plot/plotter.c (original)
+++ trunk/netsurf/atari/plot/plotter.c Tue Mar 1 13:29:40 2011
@@ -683,7 +683,7 @@
}
/* Shared (static in object oriented slang) plotter functions: */
-int plotter_get_clip( GEM_PLOTTER self, struct s_clipping * out )
+int plotter_get_clip( GEM_PLOTTER self, struct rect * out )
{
out->x0 = self->clipping.x0;
out->y0 = self->clipping.y0;
@@ -692,12 +692,12 @@
return( 1 );
}
-int plotter_std_clip(GEM_PLOTTER self,int x0, int y0, int x1, int y1)
-{
- self->clipping.x0 = x0;
- self->clipping.y0 = y0;
- self->clipping.x1 = x1;
- self->clipping.y1 = y1;
+int plotter_std_clip(GEM_PLOTTER self, const struct rect * clip)
+{
+ self->clipping.x0 = clip->x0;
+ self->clipping.y0 = clip->y0;
+ self->clipping.x1 = clip->x1;
+ self->clipping.y1 = clip->y1;
return ( 1 );
}
@@ -706,7 +706,7 @@
{
return;
if( set == true ) {
- struct s_clipping * c = &self->clipping;
+ struct rect * c = &self->clipping;
short vdiflags[58];
short newclip[4];
vq_extnd( self->vdi_handle, 1, (short*)&vdiflags);
Modified: trunk/netsurf/atari/plot/plotter.h
URL:
http://source.netsurf-browser.org/trunk/netsurf/atari/plot/plotter.h?rev=...
==============================================================================
--- trunk/netsurf/atari/plot/plotter.h (original)
+++ trunk/netsurf/atari/plot/plotter.h Tue Mar 1 13:29:40 2011
@@ -25,6 +25,7 @@
#include <string.h>
#include <windom.h>
+#include "desktop/plotters.h"
#include "desktop/plot_style.h"
#include "image/bitmap.h"
#include "atari/bitmap.h"
@@ -103,12 +104,7 @@
};
-struct s_clipping {
- short x0;
- short y0;
- short x1;
- short y1;
-};
+struct rect;
struct s_vdi_sysinfo {
short vdi_handle; /* vdi handle */
@@ -162,7 +158,7 @@
typedef int (*_pmf_update_screen)(GEM_PLOTTER self);
typedef int (*_pmf_put_pixel)(GEM_PLOTTER self, int x, int y, int color );
typedef int (*_pmf_copy_rect)(GEM_PLOTTER self, GRECT src, GRECT dst );
-typedef int (*_pmf_clip)(GEM_PLOTTER self, int x0, int y0, int x1, int y1);
+typedef int (*_pmf_clip)(GEM_PLOTTER self, const struct rect * clip );
typedef int (*_pmf_arc)(GEM_PLOTTER self, int x, int y, int radius, int angle1, int
angle2, const plot_style_t * pstyle);
typedef int (*_pmf_disc)(GEM_PLOTTER self, int x, int y, int radius, const plot_style_t *
pstyle);
typedef int (*_pmf_line)(GEM_PLOTTER self, int x0, int y0, int x1, int y1, const
plot_style_t * pstyle);
@@ -185,7 +181,7 @@
struct s_vdi_sysinfo * scr;
void * priv_data;
int bpp_virt; /* bit depth of framebuffer */
- struct s_clipping clipping;
+ struct rect clipping;
struct s_frame_buf fbuf[MAX_FRAMEBUFS];
int cfbi; /* current framebuffer index */
@@ -296,8 +292,8 @@
short rgb_to_666_index(unsigned char r, unsigned char g, unsigned char b);
/* shared / static methods ... */
-int plotter_get_clip( GEM_PLOTTER self, struct s_clipping * out );
-int plotter_std_clip(GEM_PLOTTER self,int x0, int y0, int x1, int y1);
+int plotter_get_clip( GEM_PLOTTER self, struct rect * out );
+int plotter_std_clip(GEM_PLOTTER self, const struct rect * clip);
void plotter_vdi_clip( GEM_PLOTTER self, bool set);
#define PLOTTER_IS_LOCKED(plotter) ( plotter->private_flags & PLOTTER_FLAG_LOCKED
)
Modified: trunk/netsurf/atari/plot/plotter_vdi.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/atari/plot/plotter_vdi.c?...
==============================================================================
--- trunk/netsurf/atari/plot/plotter_vdi.c (original)
+++ trunk/netsurf/atari/plot/plotter_vdi.c Tue Mar 1 13:29:40 2011
@@ -122,6 +122,8 @@
{
int retval = 0;
int i;
+ struct rect clip;
+
self->dtor = dtor;
self->resize= resize;
self->move = move;
@@ -167,7 +169,12 @@
/* offscreen: FIRSTFB(self).mem = malloc( FIRSTFB(self).size ); */
FIRSTFB(self).mem = NULL;
update_visible_rect( self );
- self->clip( self, 0, 0, FIRSTFB(self).w, FIRSTFB(self).h );
+
+ clip.x0 = 0;
+ clip.y0 = 0;
+ clip.x1 = FIRSTFB(self).w;
+ clip.y1 = FIRSTFB(self).h;
+ self->clip( self, &clip );
/* store system palette & setup the new (web) palette: */
i = 0;
if( app.nplanes <= 8 ){
@@ -601,7 +608,7 @@
unsigned int i=0;
short d[4];
if( vdi_sysinfo.maxpolycoords > 0 )
- assert( n < vdi_sysinfo.maxpolycoords );
+ assert( (signed int)n < vdi_sysinfo.maxpolycoords );
/*
Does this double check make sense?
else
@@ -1041,11 +1048,8 @@
static int text(GEM_PLOTTER self, int x, int y, const char *text, size_t length, const
plot_font_style_t *fstyle)
{
- self->font_plotter->text( self->font_plotter,
- x,
- y,
- text, length,
- fstyle
+ self->font_plotter->text( self->font_plotter, x, y,
+ text, length, fstyle
);
return ( 1 );
}