C# Класс CSharpGL.FontBitmapHelper

helper class.
Показать файл Открыть проект

Приватные методы

Метод Описание
IsEmptyPixel ( BitmapData bitmapData, int x, int y ) : bool

Returns true if the given pixel is empty (i.e. black)

PrepareFinalBitmapSize ( FontBitmap fontBitmap, int &width, int &height ) : void

prepare final bitmap's size.

PrepareInitialGlyphDict ( FontBitmap fontBitmap, string charSet, int &singleCharWidth, int &singleCharHeight ) : void

Get glyph's size by graphics.MeasureString(). Then shrink glyph's size. xoffset now means offset in a single glyph's bitmap.

PrintBitmap ( FontBitmap fontBitmap, int singleCharWidth, int singleCharHeight, int width, int height ) : void

Print the final bitmap that contains all glyphs. And also setup glyph's xoffset, yoffset.

RetargetGlyphRectangleInwards ( BitmapData bitmapData, GlyphInfo glyph ) : void

shrink glyph's width to fit in exactly.