Changeset 316 in Sophya for trunk/SophyaPI/PI/pigraphuc.cc


Ignore:
Timestamp:
Jun 15, 1999, 3:56:51 PM (26 years ago)
Author:
ercodmgr
Message:

Introduction PIFont - Reza 15/06/99

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/pigraphuc.cc

    r204 r316  
    583583
    584584/* --Methode-- */
     585void PIGraphicUC::SelFont(PIFont & fnt)
     586{
     587  if (!mGrC) return;
     588  mGrC->SelFont(fnt);
     589  return; 
     590}
     591
     592/* --Methode-- */
    585593void PIGraphicUC::SelFont(PIFontSize sz, PIFontAtt att)
    586594{
     
    671679}
    672680
    673 /* --Methode-- */
    674 PIFontAtt PIGraphicUC::GetFontAtt()
    675 {
    676   if (!mGrC) return(PI_NotDefFontAtt);
    677   return(mGrC->GetFontAtt());
    678 }
    679 
    680 /* --Methode-- */
    681 int PIGraphicUC::GetFontSize()
    682 {
    683   if (!mGrC) return(0);
    684   return(mGrC->GetFontSize());
    685 }
    686681
    687682/* --Methode-- */
     
    706701}
    707702/* --Methode-- */
    708 PIGrCoord PIGraphicUC::GetFontHeightUC(PIGrCoord& asc, PIGrCoord& desc)
     703PIGrCoord PIGraphicUC::GetFontHeight(PIGrCoord& asc, PIGrCoord& desc)
    709704{
    710705  asc = desc = 0;
     
    712707  int h,a,d;
    713708  double fh, fa, fd, x;
    714   h = mGrC->GetFontHeight(a, d) ;
     709  h = myFont.GetFontHeight(a, d) ;
    715710  DGrC2UC(0., h, x, fh);
    716711  DGrC2UC(0., a, x, fa);
     
    720715}
    721716
    722 /* --Methode-- */
    723 int PIGraphicUC::GetFontHeight(int& asc, int& desc)
    724 {
    725   asc = desc = 0;
    726   if (!mGrC) return(0);
    727   return( mGrC->GetFontHeight(asc, desc) );
    728 }
    729717
    730718/* --Methode-- */
     
    732720{
    733721  if (!mGrC) return(0.);
    734   double dx = mGrC->CalcStringWidth(s);
     722  double dx = myFont.GetStringWidth(s);
    735723  double dxx, dxy;
    736724  DGrC2UC(dx, dx, dxx, dxy);
Note: See TracChangeset for help on using the changeset viewer.