Ticket #86: debug-path.patch

File debug-path.patch, 2.0 kB (added by artem, 8 months ago)
  • include/mapnik/font_engine_freetype.hpp

     
    333333            FT_BBox bbox;    
    334334            bbox.xMin = bbox.yMin = 32000;  
    335335            bbox.xMax = bbox.yMax = -32000; //hmm??  
     336            std::cerr << "   New glyphs: " << path->num_nodes() << std::endl; 
    336337             
    337338            for (int i = 0; i < path->num_nodes(); i++)  
    338339            { 
     
    340341                double x, y, angle; 
    341342                 
    342343                path->vertex(&c, &x, &y, &angle); 
    343 //                std::clog << "   prepare_glyph: " << (unsigned char)c << "," << x << "," << y << "," << angle << std::endl; 
     344                std::cerr << "   prepare_glyph: " << (unsigned char)c << "," << x << "," << y << "," << angle << std::endl; 
    344345 
    345346 
    346347                FT_BBox glyph_bbox;  
     
    385386                } 
    386387                 
    387388                // take ownership of the glyph 
     389                std::cerr << "   pushed_glyph: " << i << " " << (unsigned char)c << "," << x << "," << y << "," << angle << std::endl; 
    388390                glyphs_.push_back(new glyph_t(image)); 
    389391            } 
    390392             
     
    396398            FT_Error  error; 
    397399            FT_Vector start; 
    398400            unsigned height = pixmap_.height(); 
    399              
     401            int i = 0; 
    400402            start.x =  static_cast<FT_Pos>(x0 * (1 << 6));  
    401403            start.y =  static_cast<FT_Pos>((height - y0) * (1 << 6)); 
    402404             
     
    407409            if (halo_radius_ > 0 && halo_radius_ < 256) 
    408410            { 
    409411                //render halo  
     412                i=0; 
    410413                for ( pos = glyphs_.begin(); pos != glyphs_.end();++pos) 
    411414                { 
    412              
     415                     
     416                    std::cerr << "   pulling_glyph: " << i++ << std::endl; 
     417                     
    413418                    FT_Glyph_Transform(pos->image,0,&start); 
    414419             
    415420                    error = FT_Glyph_To_Bitmap( &(pos->image),FT_RENDER_MODE_NORMAL,0,1);