예제 #1
0
 public GraphicsTextRenderer(Graphics graphics, SpriteFont font,
                             TextureScalingQuality quality = TextureScalingQuality.Linear)
 {
     Font      = font;
     _graphics = graphics;
     foreach (var page in font.Pages)
     {
         var texture = TextureFactory.FromImage(_graphics, quality,
                                                page.Texture);
         texture.BlendMode = BlendMode.AlphaBlend;
         page.Texture.Dispose(); // dispose and unset the original image
         page.Texture = null;
         _pages.Add(texture);
     }
 }