From 176622db4325921b8a52e4d4605452ef9ce41e5f Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Mon, 4 Aug 2008 22:32:05 +0000 Subject: NR:: => Geom:: for much of src/ui and src/widgets (bzr r6561) --- src/widgets/font-selector.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/widgets/font-selector.cpp') diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index d6326791b..1faf7005f 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -21,6 +21,7 @@ #endif #include +#include #include #include #include @@ -28,6 +29,8 @@ #include #include +#include <2geom/transforms.h> + #include #include #include @@ -661,7 +664,7 @@ static gint sp_font_preview_expose(GtkWidget *widget, GdkEventExpose *event) pango_font_description_free(pfd); } } - NR::Point base_pt(str_text->glyph_text[i].x, str_text->glyph_text[i].y); + Geom::Point base_pt(str_text->glyph_text[i].x, str_text->glyph_text[i].y); base_pt *= theSize; glyphs[len] = str_text->glyph_text[i].gl; @@ -670,10 +673,10 @@ static gint sp_font_preview_expose(GtkWidget *widget, GdkEventExpose *event) if ( curF ) { NR::Maybe nbbox = curF->BBox(str_text->glyph_text[i].gl); if (nbbox) { - bbox.x0 = MIN(bbox.x0, base_pt[NR::X] + theSize * (nbbox->min())[0]); - bbox.y0 = MIN(bbox.y0, base_pt[NR::Y] - theSize * (nbbox->max())[1]); - bbox.x1 = MAX(bbox.x1, base_pt[NR::X] + theSize * (nbbox->max())[0]); - bbox.y1 = MAX(bbox.y1, base_pt[NR::Y] - theSize * (nbbox->min())[1]); + bbox.x0 = MIN(bbox.x0, base_pt[Geom::X] + theSize * (nbbox->min())[0]); + bbox.y0 = MIN(bbox.y0, base_pt[Geom::Y] - theSize * (nbbox->max())[1]); + bbox.x1 = MAX(bbox.x1, base_pt[Geom::X] + theSize * (nbbox->max())[0]); + bbox.y1 = MAX(bbox.y1, base_pt[Geom::Y] - theSize * (nbbox->min())[1]); } } } @@ -690,13 +693,13 @@ static gint sp_font_preview_expose(GtkWidget *widget, GdkEventExpose *event) unival = g_utf8_get_char (p); glyphs[len] = tface->MapUnicodeChar( unival); hpos[len] = (int)px; - NR::Point adv = fprev->rfont->Advance(glyphs[len]); + Geom::Point adv = fprev->rfont->Advance(glyphs[len]); fprev->rfont->BBox( glyphs[len], &gbox); bbox.x0 = MIN (px + gbox.x0, bbox.x0); bbox.y0 = MIN (py + gbox.y0, bbox.y0); bbox.x1 = MAX (px + gbox.x1, bbox.x1); bbox.y1 = MAX (py + gbox.y1, bbox.y1); - px += adv[NR::X]; + px += adv[Geom::X]; len += 1; p = g_utf8_next_char (p); }*/ @@ -741,7 +744,7 @@ static gint sp_font_preview_expose(GtkWidget *widget, GdkEventExpose *event) } raster_glyph *g = (curRF) ? curRF->GetGlyph(glyphs[i]) : NULL; if ( g ) { - g->Blit(NR::Point(hpos[i] + startx, starty), m); + g->Blit(Geom::Point(hpos[i] + startx, starty), m); } } if (curRF) { @@ -802,8 +805,8 @@ void sp_font_preview_set_font(SPFontPreview *fprev, font_instance *font, SPFontS if (fprev->font) { - NR::Matrix flip(NR::scale(fsel->fontsize, -fsel->fontsize)); - fprev->rfont = fprev->font->RasterFont(flip, 0); + Geom::Matrix flip(Geom::Scale(fsel->fontsize, -fsel->fontsize)); + fprev->rfont = fprev->font->RasterFont(from_2geom(flip), 0); } if (GTK_WIDGET_DRAWABLE (fprev)) gtk_widget_queue_draw (GTK_WIDGET (fprev)); -- cgit v1.2.3