mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 20:46:50 +03:00
Purge nsgtk_plot_set_scale(), nsgtk_plot_get_scale() and nsgtk_plot_scale global.
svn path=/trunk/netsurf/; revision=11943
This commit is contained in:
parent
b46e69fe22
commit
5833549a35
@ -51,22 +51,9 @@ GdkGC *current_gc;
|
|||||||
cairo_t *current_cr;
|
cairo_t *current_cr;
|
||||||
|
|
||||||
static GdkRectangle cliprect;
|
static GdkRectangle cliprect;
|
||||||
static float nsgtk_plot_scale = 1.0;
|
|
||||||
|
|
||||||
struct plotter_table plot;
|
struct plotter_table plot;
|
||||||
|
|
||||||
/** set plotting scale factor. */
|
|
||||||
void nsgtk_plot_set_scale(float s)
|
|
||||||
{
|
|
||||||
nsgtk_plot_scale = s;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** get plotting scale factor. */
|
|
||||||
float nsgtk_plot_get_scale(void)
|
|
||||||
{
|
|
||||||
return nsgtk_plot_scale;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Set cairo context colour to nsgtk colour. */
|
/** Set cairo context colour to nsgtk colour. */
|
||||||
void nsgtk_set_colour(colour c)
|
void nsgtk_set_colour(colour c)
|
||||||
{
|
{
|
||||||
|
@ -37,8 +37,6 @@ extern GdkGC *current_gc;
|
|||||||
extern cairo_t *current_cr;
|
extern cairo_t *current_cr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void nsgtk_plot_set_scale(float s);
|
|
||||||
float nsgtk_plot_get_scale(void);
|
|
||||||
void nsgtk_set_colour(colour c);
|
void nsgtk_set_colour(colour c);
|
||||||
void nsgtk_plot_caret(int x, int y, int h);
|
void nsgtk_plot_caret(int x, int y, int h);
|
||||||
|
|
||||||
|
@ -1498,7 +1498,6 @@ static gboolean nsgtk_history_expose_event(GtkWidget *widget,
|
|||||||
current_cr = gdk_cairo_create(current_drawable);
|
current_cr = gdk_cairo_create(current_drawable);
|
||||||
#endif
|
#endif
|
||||||
plot = nsgtk_plotters;
|
plot = nsgtk_plotters;
|
||||||
nsgtk_plot_set_scale(1.0);
|
|
||||||
|
|
||||||
clip.x0 = event->area.x;
|
clip.x0 = event->area.x;
|
||||||
clip.y0 = event->area.y;
|
clip.y0 = event->area.y;
|
||||||
|
@ -99,7 +99,6 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap,
|
|||||||
|
|
||||||
/* Plotters need to know thumbnail scale */
|
/* Plotters need to know thumbnail scale */
|
||||||
plot_scale = thumbnail_get_redraw_scale(content, cwidth);
|
plot_scale = thumbnail_get_redraw_scale(content, cwidth);
|
||||||
nsgtk_plot_set_scale(plot_scale);
|
|
||||||
|
|
||||||
/* set to plot to pixmap */
|
/* set to plot to pixmap */
|
||||||
current_drawable = pixmap;
|
current_drawable = pixmap;
|
||||||
|
@ -210,14 +210,13 @@ gboolean nsgtk_tree_window_expose_event(GtkWidget *widget,
|
|||||||
current_cr = gdk_cairo_create(current_drawable);
|
current_cr = gdk_cairo_create(current_drawable);
|
||||||
#endif
|
#endif
|
||||||
plot = nsgtk_plotters;
|
plot = nsgtk_plotters;
|
||||||
nsgtk_plot_set_scale(1.0);current_widget = widget;
|
current_widget = widget;
|
||||||
current_drawable = widget->window;
|
current_drawable = widget->window;
|
||||||
current_gc = gdk_gc_new(current_drawable);
|
current_gc = gdk_gc_new(current_drawable);
|
||||||
#ifdef CAIRO_VERSION
|
#ifdef CAIRO_VERSION
|
||||||
current_cr = gdk_cairo_create(current_drawable);
|
current_cr = gdk_cairo_create(current_drawable);
|
||||||
#endif
|
#endif
|
||||||
plot = nsgtk_plotters;
|
plot = nsgtk_plotters;
|
||||||
nsgtk_plot_set_scale(1.0);
|
|
||||||
|
|
||||||
tree_set_redraw(tree, true);
|
tree_set_redraw(tree, true);
|
||||||
tree_draw(tree, 0, 0, x, y, width, height);
|
tree_draw(tree, 0, 0, x, y, width, height);
|
||||||
|
@ -176,7 +176,6 @@ static gboolean nsgtk_window_expose_event(GtkWidget *widget,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
plot = nsgtk_plotters;
|
plot = nsgtk_plotters;
|
||||||
nsgtk_plot_set_scale(g->bw->scale);
|
|
||||||
current_redraw_browser = g->bw;
|
current_redraw_browser = g->bw;
|
||||||
|
|
||||||
clip.x0 = event->area.x;
|
clip.x0 = event->area.x;
|
||||||
|
Loading…
Reference in New Issue
Block a user