adonthell-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-commits] CVS: adonthell/src/gui label.cc,1.1.2.4,1.1.2.5 ttf


From: VENNIN Joel <address@hidden>
Subject: [Adonthell-commits] CVS: adonthell/src/gui label.cc,1.1.2.4,1.1.2.5 ttf.cc,1.1.2.4,1.1.2.5
Date: Fri, 04 Apr 2003 14:16:25 -0500

Update of /cvsroot/adonthell/adonthell/src/gui
In directory subversions:/tmp/cvs-serv25120/gui

Modified Files:
      Tag: Branch_road_to_0-4
        label.cc ttf.cc 
Log Message:
Some change to find a bug ....


Index: label.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/gui/Attic/label.cc,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -r1.1.2.4 -r1.1.2.5
*** label.cc    5 Mar 2003 10:33:43 -0000       1.1.2.4
--- label.cc    4 Apr 2003 19:16:23 -0000       1.1.2.5
***************
*** 477,482 ****
  void label::draw_string (const bool at_cursor)
  { 
!   glyph_info * glyph;
  
      u_int16 tmp_start_line;
      u_int16 tx = 0, ty = 0;
--- 477,484 ----
  void label::draw_string (const bool at_cursor)
  { 
!   std::cout << "Draw String begin\n";
  
+   glyph_info * glyph;
+   
      u_int16 tmp_start_line;
      u_int16 tx = 0, ty = 0;
***************
*** 499,502 ****
--- 501,505 ----
      } 
      
+ 
      // draw the first line
      for (j = idx_cur_line;
***************
*** 505,510 ****
      {
        glyph = &((*my_font_) [my_text_[j]]);
!       //      std::cout << tx << " " <<  ty + glyph->my_yoffset << " " << 
length() << " " << height () << std::endl;
!       glyph->my_glyph->draw (tx + glyph->my_minx + 1 , ty + 
glyph->my_yoffset, NULL, this);
        tx += glyph->my_advance; 
      }
--- 508,514 ----
      {
        glyph = &((*my_font_) [my_text_[j]]);
!       std::cout <<"First Line " <<  tx << " " << (s_int16)  (ty + 
glyph->my_yoffset) << " " << length() << " " << height () << std::endl;
!       glyph->my_glyph->draw ((s_int16) (tx + glyph->my_minx + 1) , (s_int16) 
(ty + glyph->my_yoffset),NULL, this);
!       std::cout << "NeXt\n";
        tx += glyph->my_advance; 
      }
***************
*** 523,527 ****
          glyph = &((*my_font_) [my_text_[j]]);
          
!         //      std::cout << tx << " " <<  ty + glyph->my_yoffset << " " << 
length() << " " << height () << std::endl;
          
          glyph->my_glyph->draw (tx, ty + glyph->my_yoffset, NULL, this);
--- 527,531 ----
          glyph = &((*my_font_) [my_text_[j]]);
          
!         std::cout << tx << " " <<  ty + glyph->my_yoffset << " " << length() 
<< " " << height () << std::endl;
          
          glyph->my_glyph->draw (tx, ty + glyph->my_yoffset, NULL, this);
***************
*** 531,534 ****
--- 535,539 ----
          tmp_start_line++; 
      } 
+     std::cout << "Draw String end\n";
  }
  

Index: ttf.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/gui/Attic/ttf.cc,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -r1.1.2.4 -r1.1.2.5
*** ttf.cc      11 Mar 2003 13:35:58 -0000      1.1.2.4
--- ttf.cc      4 Apr 2003 19:16:23 -0000       1.1.2.5
***************
*** 69,74 ****
      }
      
-     //    error = FT_Select_Charmap (&my_face, 
FT_Encoding.FT_ENCODING_UNICODE);
- 
      else if ( error )
      {
--- 69,72 ----
***************
*** 189,197 ****
      for (int i = 0; i < dest->length () ; i++)
        {
!       if (*pbmp > 50)  dest->put_pix (dx + i, dy +j, pixelcol); 
        else dest->put_pix (dx + i, dy + j, gfx::screen::trans_col ()); 
        pbmp++; 
        } 
    dest->unlock ();  
  }
  
--- 187,197 ----
      for (int i = 0; i < dest->length () ; i++)
        {
!       if (*pbmp > 70)  dest->put_pix (dx + i, dy +j, pixelcol); 
        else dest->put_pix (dx + i, dy + j, gfx::screen::trans_col ()); 
        pbmp++; 
        } 
    dest->unlock ();  
+   dest->set_mask (true);
+   std::cout << "Copy to Bitmap done\n";
  }
  
***************
*** 276,279 ****
--- 276,281 ----
    my_glyph = new gfx::image (glyph->bitmap.width, glyph->bitmap.rows);
    my_glyph->set_mask (true);
+   std::cout << "New Image: " << my_glyph->length() << " " << my_glyph->height 
() << "\n";
+   
    ft.copy_bitmap_to_image ( glyph->bitmap.buffer, my_glyph);
  }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]