summaryrefslogtreecommitdiff
path: root/gtk/gtk_plotters.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-02-27 16:03:02 +0000
committerJames Bursa <james@netsurf-browser.org>2005-02-27 16:03:02 +0000
commit8550695710d5197a038c880d05e5d30d3ab31aff (patch)
treed79e19df4d7d492d50c2dfa2777fbe252633818f /gtk/gtk_plotters.c
parent10b27f45f84d05d75d2d6c1c31ed851038784e4f (diff)
downloadnetsurf-8550695710d5197a038c880d05e5d30d3ab31aff.tar.gz
netsurf-8550695710d5197a038c880d05e5d30d3ab31aff.tar.bz2
[project @ 2005-02-27 16:03:02 by bursa]
Fix the GTK build. svn path=/import/netsurf/; revision=1527
Diffstat (limited to 'gtk/gtk_plotters.c')
-rw-r--r--gtk/gtk_plotters.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/gtk/gtk_plotters.c b/gtk/gtk_plotters.c
index 9054573e2..eab937ead 100644
--- a/gtk/gtk_plotters.c
+++ b/gtk/gtk_plotters.c
@@ -30,7 +30,7 @@ static bool nsgtk_plot_polygon(int *p, unsigned int n, colour fill);
static bool nsgtk_plot_fill(int x0, int y0, int x1, int y1, colour c);
static bool nsgtk_plot_clip(int clip_x0, int clip_y0,
int clip_x1, int clip_y1);
-static bool nsgtk_plot_text(int x, int y, struct font_data *font,
+static bool nsgtk_plot_text(int x, int y, struct css_style *style,
const char *text, size_t length, colour bg, colour c);
static bool nsgtk_plot_disc(int x, int y, int radius, colour colour);
static bool nsgtk_plot_bitmap(int x, int y, int width, int height,
@@ -122,31 +122,10 @@ bool nsgtk_plot_clip(int clip_x0, int clip_y0,
}
-bool nsgtk_plot_text(int x, int y, struct font_data *font,
+bool nsgtk_plot_text(int x, int y, struct css_style *style,
const char *text, size_t length, colour bg, colour c)
{
- PangoContext *context;
- PangoLayout *layout;
- PangoLayoutLine *line;
- GdkColor colour = { 0,
- ((c & 0xff) << 8) | (c & 0xff),
- (c & 0xff00) | (c & 0xff00 >> 8),
- ((c & 0xff0000) >> 8) | (c & 0xff0000 >> 16) };
-
- context = gtk_widget_get_pango_context(current_widget);
- layout = pango_layout_new(context);
- pango_layout_set_font_description(layout,
- (const PangoFontDescription *) font->id);
- pango_layout_set_text(layout, text, length);
-
- line = pango_layout_get_line(layout, 0);
-
- gdk_draw_layout_line_with_colors(current_drawable, current_gc,
- x, y, line, &colour, 0);
-
- g_object_unref(layout);
-
- return true;
+ return nsfont_paint(style, text, length, x, y, c);
}