80 namespace SiliconStudio.
Paradox.Assets.SpriteFont.Compiler
83 internal static class GlyphCropper
85 public static void Crop(Glyph glyph)
88 while ((glyph.Subrect.Height > 1) && BitmapUtils.IsAlphaEntirely(0, glyph.Bitmap,
new Rectangle(glyph.Subrect.X, glyph.Subrect.Y, glyph.Subrect.Width, 1)))
91 glyph.Subrect.Height--;
97 while ((glyph.Subrect.Height > 1) && BitmapUtils.IsAlphaEntirely(0, glyph.Bitmap,
new Rectangle(glyph.Subrect.X, glyph.Subrect.Bottom - 1, glyph.Subrect.Width, 1)))
99 glyph.Subrect.Height--;
103 while ((glyph.Subrect.Width > 1) && BitmapUtils.IsAlphaEntirely(0, glyph.Bitmap,
new Rectangle(glyph.Subrect.X, glyph.Subrect.Y, 1, glyph.Subrect.Height)))
106 glyph.Subrect.Width--;
112 while ((glyph.Subrect.Width > 1) && BitmapUtils.IsAlphaEntirely(0, glyph.Bitmap,
new Rectangle(glyph.Subrect.Right - 1, glyph.Subrect.Y, 1, glyph.Subrect.Height)))
114 glyph.Subrect.Width--;
System.Windows.Shapes.Rectangle Rectangle