mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-23 23:09:39 +03:00
Fix for knockout rendering of native formats
svn path=/trunk/netsurf/; revision=2869
This commit is contained in:
parent
66c4906fb6
commit
7aaa33d2e5
@ -70,7 +70,8 @@ const struct plotter_table knockout_plotters = {
|
|||||||
knockout_plot_bitmap,
|
knockout_plot_bitmap,
|
||||||
knockout_plot_bitmap_tile,
|
knockout_plot_bitmap_tile,
|
||||||
knockout_plot_group_start,
|
knockout_plot_group_start,
|
||||||
knockout_plot_group_end
|
knockout_plot_group_end,
|
||||||
|
knockout_plot_flush
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ struct plotter_table {
|
|||||||
bool repeat_x, bool repeat_y);
|
bool repeat_x, bool repeat_y);
|
||||||
bool (*group_start)(const char *name); /** optional */
|
bool (*group_start)(const char *name); /** optional */
|
||||||
bool (*group_end)(void); /** optional */
|
bool (*group_end)(void); /** optional */
|
||||||
|
bool (*flush)(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Current plotters, must be assigned before use. */
|
/** Current plotters, must be assigned before use. */
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include "oslib/os.h"
|
#include "oslib/os.h"
|
||||||
#include "oslib/wimp.h"
|
#include "oslib/wimp.h"
|
||||||
#include "netsurf/utils/config.h"
|
#include "netsurf/utils/config.h"
|
||||||
|
#include "netsurf/desktop/plotters.h"
|
||||||
#include "netsurf/content/content.h"
|
#include "netsurf/content/content.h"
|
||||||
#include "netsurf/riscos/artworks.h"
|
#include "netsurf/riscos/artworks.h"
|
||||||
#include "netsurf/riscos/gui.h"
|
#include "netsurf/riscos/gui.h"
|
||||||
@ -214,6 +215,9 @@ bool artworks_redraw(struct content *c, int x, int y,
|
|||||||
os_trfm matrix;
|
os_trfm matrix;
|
||||||
int vals[24];
|
int vals[24];
|
||||||
|
|
||||||
|
if (plot.flush && !plot.flush())
|
||||||
|
return false;
|
||||||
|
|
||||||
/* Scaled image. Transform units (65536*OS units) */
|
/* Scaled image. Transform units (65536*OS units) */
|
||||||
matrix.entries[0][0] = width * 65536 / c->width;
|
matrix.entries[0][0] = width * 65536 / c->width;
|
||||||
matrix.entries[0][1] = 0;
|
matrix.entries[0][1] = 0;
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "oslib/drawfile.h"
|
#include "oslib/drawfile.h"
|
||||||
#include "netsurf/utils/config.h"
|
#include "netsurf/utils/config.h"
|
||||||
|
#include "netsurf/desktop/plotters.h"
|
||||||
#include "netsurf/content/content.h"
|
#include "netsurf/content/content.h"
|
||||||
#include "netsurf/riscos/draw.h"
|
#include "netsurf/riscos/draw.h"
|
||||||
#include "netsurf/riscos/gui.h"
|
#include "netsurf/riscos/gui.h"
|
||||||
@ -86,6 +87,9 @@ bool draw_redraw(struct content *c, int x, int y,
|
|||||||
os_error *error;
|
os_error *error;
|
||||||
os_trfm matrix;
|
os_trfm matrix;
|
||||||
|
|
||||||
|
if (plot.flush && !plot.flush())
|
||||||
|
return false;
|
||||||
|
|
||||||
/* Scaled image. Transform units (65536*OS units) */
|
/* Scaled image. Transform units (65536*OS units) */
|
||||||
matrix.entries[0][0] = width * 65536 / c->width;
|
matrix.entries[0][0] = width * 65536 / c->width;
|
||||||
matrix.entries[0][1] = 0;
|
matrix.entries[0][1] = 0;
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "netsurf/utils/log.h"
|
#include "netsurf/utils/log.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static bool ro_plot_clg(colour c);
|
static bool ro_plot_clg(colour c);
|
||||||
static bool ro_plot_rectangle(int x0, int y0, int width, int height,
|
static bool ro_plot_rectangle(int x0, int y0, int width, int height,
|
||||||
int line_width, colour c, bool dotted, bool dashed);
|
int line_width, colour c, bool dotted, bool dashed);
|
||||||
@ -59,6 +60,7 @@ const struct plotter_table ro_plotters = {
|
|||||||
ro_plot_bitmap,
|
ro_plot_bitmap,
|
||||||
ro_plot_bitmap_tile,
|
ro_plot_bitmap_tile,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -129,7 +129,8 @@ static const struct plotter_table print_fonts_plotters = {
|
|||||||
print_fonts_plot_bitmap,
|
print_fonts_plot_bitmap,
|
||||||
print_fonts_plot_bitmap_tile,
|
print_fonts_plot_bitmap_tile,
|
||||||
print_fonts_plot_group_start,
|
print_fonts_plot_group_start,
|
||||||
print_fonts_plot_group_end
|
print_fonts_plot_group_end,
|
||||||
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -63,7 +63,8 @@ const struct plotter_table ro_save_draw_plotters = {
|
|||||||
ro_save_draw_bitmap,
|
ro_save_draw_bitmap,
|
||||||
ro_save_draw_bitmap_tile,
|
ro_save_draw_bitmap_tile,
|
||||||
ro_save_draw_group_start,
|
ro_save_draw_group_start,
|
||||||
ro_save_draw_group_end
|
ro_save_draw_group_end,
|
||||||
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
struct pencil_diagram *ro_save_draw_diagram;
|
struct pencil_diagram *ro_save_draw_diagram;
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "oslib/osspriteop.h"
|
#include "oslib/osspriteop.h"
|
||||||
#include "netsurf/utils/config.h"
|
#include "netsurf/utils/config.h"
|
||||||
|
#include "netsurf/desktop/plotters.h"
|
||||||
#include "netsurf/content/content.h"
|
#include "netsurf/content/content.h"
|
||||||
#include "netsurf/riscos/gui.h"
|
#include "netsurf/riscos/gui.h"
|
||||||
#include "netsurf/riscos/image.h"
|
#include "netsurf/riscos/image.h"
|
||||||
@ -98,6 +99,9 @@ bool sprite_redraw(struct content *c, int x, int y,
|
|||||||
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
|
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
|
||||||
float scale, colour background_colour)
|
float scale, colour background_colour)
|
||||||
{
|
{
|
||||||
|
if (plot.flush && !plot.flush())
|
||||||
|
return false;
|
||||||
|
|
||||||
return image_redraw(c->data.sprite.data,
|
return image_redraw(c->data.sprite.data,
|
||||||
ro_plot_origin_x + x * 2,
|
ro_plot_origin_x + x * 2,
|
||||||
ro_plot_origin_y - y * 2,
|
ro_plot_origin_y - y * 2,
|
||||||
|
Loading…
Reference in New Issue
Block a user