~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu4

« back to all changes in this revision

Viewing changes to src/libnrtype/RasterFont.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Kees Cook, Ted Gould
  • Date: 2008-02-10 14:20:16 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080210142016-vcnb2zqyhszu0xvb
Tags: 0.46~pre1-0ubuntu1
[ Kees Cook ]
* debian/control:
  - add libgtkspell-dev build-dep to gain GtkSpell features (LP: #183547).
  - update Standards version (no changes needed).
  - add Vcs and Homepage fields.
  - switch to new python-lxml dep.
* debian/{control,rules}: switch from dpatch to quilt for more sanity.
* debian/patches/20_fix_glib_and_gxx43_ftbfs.patch:
  - merged against upstream fixes.
  - added additional fixes for newly written code.
* debian/rules: enable parallel building.

[ Ted Gould ]
* Updating POTFILES.in to make it so things build correctly.
* debian/control:
  - add ImageMagick++ and libboost-dev to build-deps

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
{
108
108
        area->x0=area->y0=area->x1=area->y1=0;
109
109
        if ( daddy == NULL ) return;
110
 
        NR::Rect  res=daddy->BBox(glyph_id);
111
 
        NR::Point bmi=res.min(),bma=res.max();
112
 
        NR::Point tlp(bmi[0],bmi[1]),trp(bma[0],bmi[1]),blp(bmi[0],bma[1]),brp(bma[0],bma[1]);
113
 
        tlp=tlp*style.transform;
114
 
        trp=trp*style.transform;
115
 
        blp=blp*style.transform;
116
 
        brp=brp*style.transform;
117
 
        res=NR::Rect(tlp,trp);
118
 
        res.expandTo(blp);
119
 
        res.expandTo(brp);
120
 
        area->x0=(res.min())[0];
121
 
        area->y0=(res.min())[1];
122
 
        area->x1=(res.max())[0];
123
 
        area->y1=(res.max())[1];
 
110
        NR::Maybe<NR::Rect> res=daddy->BBox(glyph_id);
 
111
        if (res) {
 
112
                NR::Point bmi=res->min(),bma=res->max();
 
113
                NR::Point tlp(bmi[0],bmi[1]),trp(bma[0],bmi[1]),blp(bmi[0],bma[1]),brp(bma[0],bma[1]);
 
114
                tlp=tlp*style.transform;
 
115
                trp=trp*style.transform;
 
116
                blp=blp*style.transform;
 
117
                brp=brp*style.transform;
 
118
                *res=NR::Rect(tlp,trp);
 
119
                res->expandTo(blp);
 
120
                res->expandTo(brp);
 
121
                area->x0=(res->min())[0];
 
122
                area->y0=(res->min())[1];
 
123
                area->x1=(res->max())[0];
 
124
                area->y1=(res->max())[1];
 
125
        } else {
 
126
                nr_rect_d_set_empty(area);
 
127
        }
124
128
}
125
129
 
126
130
void           raster_font::LoadRasterGlyph(int glyph_id)