public AddGlyph ( int codePoint, |
||
codePoint | int | |
glyphData | ||
return | void |
void ReadGlyphList(BinaryReader reader) { ushort glyphCount = reader.ReadUInt16(); for (int i = 0; i < glyphCount; ++i) { //read each glyph map info //1. codepoint var glyphMap = new TextureGlyphMapData(); ushort glyphIndex = reader.ReadUInt16(); //2. area, left,top,width,height glyphMap.Left = reader.ReadUInt16(); glyphMap.Top = reader.ReadUInt16(); glyphMap.Width = reader.ReadUInt16(); glyphMap.Height = reader.ReadUInt16(); //3. border x,y int borderXY = reader.ReadUInt16(); glyphMap.BorderX = borderXY & 0xff; glyphMap.BorderY = borderXY >> 8; //--------------------------------------- //4. texture offset glyphMap.TextureXOffset = reader.ReadSingle(); glyphMap.TextureYOffset = reader.ReadSingle(); //--------------------------------------- _atlas.AddGlyph(glyphIndex, glyphMap); } }