X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Flibnrtype%2FRasterFont.cpp;h=14f6c7afac3160ed4268d2e6f2503fbb69edda77;hb=3375512f3173e051906785f0d0fd5d74320efd17;hp=61ef1720b4056dd05d89114228b0fc582b73cc13;hpb=3955580a5a68a873b098921626f5b9d841b964ec;p=inkscape.git diff --git a/src/libnrtype/RasterFont.cpp b/src/libnrtype/RasterFont.cpp index 61ef1720b..14f6c7afa 100644 --- a/src/libnrtype/RasterFont.cpp +++ b/src/libnrtype/RasterFont.cpp @@ -26,7 +26,7 @@ void font_style::Apply(Path* src,Shape* dest) { if ( stroke_width > 0 ) { if ( nbDash > 0 ) { double dlen = 0.0; - const float scale = 1/*NR::expansion(transform)*/; + const float scale = 1/*Geom::expansion(transform)*/; for (int i = 0; i < nbDash; i++) dlen += dashes[i] * scale; if (dlen >= 0.01) { float sc_offset = dash_offset * scale; @@ -96,26 +96,26 @@ raster_glyph* raster_font::GetGlyph(int glyph_id) } return res; } -NR::Point raster_font::Advance(int glyph_id) +Geom::Point raster_font::Advance(int glyph_id) { - if ( daddy == NULL ) return NR::Point(0,0); + if ( daddy == NULL ) return Geom::Point(0,0); double a=daddy->Advance(glyph_id,style.vertical); - NR::Point f_a=(style.vertical)?NR::Point(0,a):NR::Point(a,0); + Geom::Point f_a=(style.vertical)?Geom::Point(0,a):Geom::Point(a,0); return f_a*style.transform; } void raster_font::BBox(int glyph_id,NRRect *area) { area->x0=area->y0=area->x1=area->y1=0; if ( daddy == NULL ) return; - NR::Maybe res=daddy->BBox(glyph_id); + Geom::OptRect res=daddy->BBox(glyph_id); if (res) { - NR::Point bmi=res->min(),bma=res->max(); - NR::Point tlp(bmi[0],bmi[1]),trp(bma[0],bmi[1]),blp(bmi[0],bma[1]),brp(bma[0],bma[1]); + Geom::Point bmi=res->min(),bma=res->max(); + Geom::Point tlp(bmi[0],bmi[1]),trp(bma[0],bmi[1]),blp(bmi[0],bma[1]),brp(bma[0],bma[1]); tlp=tlp*style.transform; trp=trp*style.transform; blp=blp*style.transform; brp=brp*style.transform; - *res=NR::Rect(tlp,trp); + *res=Geom::Rect(tlp,trp); res->expandTo(blp); res->expandTo(brp); area->x0=(res->min())[0]; @@ -356,7 +356,7 @@ void raster_glyph::LoadSubPixelPosition(int no) delete theI; } -void raster_glyph::Blit(const NR::Point &at,NRPixBlock &over) +void raster_glyph::Blit(const Geom::Point &at,NRPixBlock &over) { if ( nb_sub_pixel <= 0 ) return; int pv=(int)ceil(at[1]);