Пример #1
0
 public void setLineWidth(float theLinewidth) {
   switch (_myFontRenderingQuality) {
     case FONT_QUALITY_LOW:
       _myLineWidth = theLinewidth;
       _myFont.setLineWidth(_myLineWidth);
       break;
     case FONT_QUALITY_HIGH:
       _myLineWidth = theLinewidth * _myScaleFactor;
       _myFont.setLineWidth(_myLineWidth);
       break;
   }
 }
Пример #2
0
 public void setSize(float theSize) {
   switch (_myFontRenderingQuality) {
     case FONT_QUALITY_LOW:
       _myFontSize = theSize;
       _myFont.setSize(_myFontSize);
       break;
     case FONT_QUALITY_HIGH:
       _myFontSize = theSize * _myScaleFactor;
       _myFont.setSize(_myFontSize);
       break;
   }
 }
Пример #3
0
 public void setImageBorder(Vector2i theBorder) {
   switch (_myFontRenderingQuality) {
     case FONT_QUALITY_LOW:
       break;
     case FONT_QUALITY_HIGH:
       theBorder.x *= _myScaleFactor;
       theBorder.y *= _myScaleFactor;
       break;
   }
   _myFont.setImageBorder(theBorder);
 }
Пример #4
0
 public BufferedImage getImage(String theText) {
   BufferedImage myImage = _myFont.getImage(theText);
   switch (_myFontRenderingQuality) {
     case FONT_QUALITY_LOW:
       break;
     case FONT_QUALITY_HIGH:
       myImage = ImageUtil.blur(myImage, _mySmoothFactor);
       myImage = ImageUtil.scale(myImage, 1.0f / _myScaleFactor);
       break;
   }
   return myImage;
 }
Пример #5
0
 public void antialias(boolean theAntialias) {
   _myFont.antialias(theAntialias);
 }
Пример #6
0
 public void setAlignment(int theAlignment) {
   _myFont.setAlignment(theAlignment);
 }
Пример #7
0
 public void setStyle(int theStyle) {
   _myFontStyle = theStyle;
   _myFont.setStyle(theStyle);
 }
Пример #8
0
 public void setFontColor(Color theColor) {
   _myFont.setFontColor(new java.awt.Color(theColor.r, theColor.g, theColor.b, theColor.a));
 }