Edit

kc3-lang/ftgl/src/FTSize.cpp

Branch :

  • Show log

    Commit

  • Author : henry
    Date : 2001-07-30 01:07:31
    Hash : 7e97717e
    Message : Return values now scaled correctly

  • src/FTSize.cpp
  • // Code generated by Object Plant
    
    #include	"FTSize.h"
    #include	"FTGL.h"
    //Insert your own code here.
    
    //End of user code.         
    
    // OPSignature:  FTSize:FTSize() 
    FTSize::FTSize()
    :	size(0)
    {
    //Insert your own code here.
    
    //End of user code.         
    }
    
    
    // OPSignature:  FTSize:~FTSize() 
    FTSize::~FTSize()
    {
    //Insert your own code here.
    
    //End of user code.         
    }
    
    
    // OPSignature: bool FTSize:SetCharSize( FT_Face:face  int:point_size  int:x_resolution  int:y_resolution ) 
    bool	FTSize::CharSize( FT_Face* ftFace, int point_size, int x_resolution, int y_resolution )
    {
    	size = point_size;
    	FT_Error err = FT_Set_Char_Size( *ftFace, 0L, point_size * 64, x_resolution, y_resolution);
    	
    	ftSize = (*ftFace)->size;
    	
    	return !err;
    }
    
    
    // OPSignature: int FTSize:GetAscender() 
    int	FTSize::Ascender() const
    {
    	return ftSize->metrics.ascender >> 6;
    }
    
    
    // OPSignature: int FTSize:GetDescender() 
    int	FTSize::Descender() const
    {
    	return ftSize->metrics.descender >> 6;
    }
    
    
    // OPSignature: int FTSize:Height() 
    int	FTSize::Height() const
    {
    	return ftSize->metrics.height >> 6;
    }
    
    
    // OPSignature: int FTSize:Width() 
    int	FTSize::Width() const
    {
    	return ftSize->metrics.max_advance >> 6;
    }