paragui-cvs
[Top][All Lists]
Advanced

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

[paragui-cvs] CVS: paragui/src/widgets pgcolumnitem.cpp,1.3,1.3.6.1 pgwi


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/widgets pgcolumnitem.cpp,1.3,1.3.6.1 pgwidget.cpp,1.4.4.13,1.4.4.14
Date: Tue, 11 Feb 2003 09:14:13 -0500

Update of /cvsroot/paragui/paragui/src/widgets
In directory subversions:/tmp/cvs-serv7649/src/widgets

Modified Files:
      Tag: devel-1-0
        pgcolumnitem.cpp pgwidget.cpp 
Log Message:
fixed clipping bugs in DrawText, PG_Columnitem



Index: pgcolumnitem.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgcolumnitem.cpp,v
retrieving revision 1.3
retrieving revision 1.3.6.1
diff -C2 -r1.3 -r1.3.6.1
*** pgcolumnitem.cpp    15 Apr 2002 13:35:36 -0000      1.3
--- pgcolumnitem.cpp    11 Feb 2003 14:14:10 -0000      1.3.6.1
***************
*** 78,82 ****
                GetTextSize(w, h, my_columntext[i].c_str());
  
!               DrawText(xshift, (my_itemheight - h)/2, 
my_columntext[i].c_str(), PG_Rect(xshift, 0, my_columnwidth[i]-5, 
my_itemheight));
                //DrawText(xshift, (my_itemheight - h) >> 1, 
my_columntext[i].c_str());
  
--- 78,86 ----
                GetTextSize(w, h, my_columntext[i].c_str());
  
!               int cw = my_columnwidth[i];
!               if(xshift + cw > my_width) {
!                       cw -=  ((xshift + cw) - my_width);
!               }
!               DrawText(xshift, (my_itemheight - h)/2, 
my_columntext[i].c_str(), PG_Rect(xshift, 0, cw-5, my_itemheight));
                //DrawText(xshift, (my_itemheight - h) >> 1, 
my_columntext[i].c_str());
  

Index: pgwidget.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwidget.cpp,v
retrieving revision 1.4.4.13
retrieving revision 1.4.4.14
diff -C2 -r1.4.4.13 -r1.4.4.14
*** pgwidget.cpp        22 Jan 2003 13:36:40 -0000      1.4.4.13
--- pgwidget.cpp        11 Feb 2003 14:14:10 -0000      1.4.4.14
***************
*** 1468,1472 ****
  
  void PG_Widget::DrawText(int x, int y, const char* text) {
!       DrawText(PG_Rect(x,y,w,h), text);
  }
  
--- 1468,1472 ----
  
  void PG_Widget::DrawText(int x, int y, const char* text) {
!       DrawText(PG_Rect(x,y,w-x,h-y), text);
  }
  
***************
*** 1476,1482 ****
--- 1476,1484 ----
                rect.x += my_xpos;
                rect.y += my_ypos;
+ //            PG_Rect r = this->IntersectRect(rect);
                PG_FontEngine::RenderText(my_srfScreen, rect, my_xpos + x, 
my_ypos + y + GetFontAscender(), text, my_internaldata->font);
        }
        else {
+ //            PG_Rect rect = this->IntersectRect(cliprect);
                PG_FontEngine::RenderText(my_srfObject, cliprect, x, y + 
GetFontAscender(), text, my_internaldata->font);
        }





reply via email to

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