public List <SimpleBitmapAtlas> LoadAtlasInfo(System.IO.Stream dataStream)
        {
            BitmapAtlasFile atlasFile = new BitmapAtlasFile();

            //read font atlas from stream data
            atlasFile.Read(dataStream);
            return(atlasFile.AtlasList);
        }
示例#2
0
        public void AddSimpleAtlasFile(RequestFont reqFont,
                                       string bitmapAtlasFile, string imgFile, TextureKind textureKind)
        {
            //TODO: use 'File' provider to access system file
            var fontAtlasFile = new BitmapAtlasFile();

            using (FileStream fs = new FileStream(bitmapAtlasFile, FileMode.Open))
            {
                fontAtlasFile.Read(fs);
            }

            _atlasList.Add(new TempMergingAtlasInfo()
            {
                reqFont             = reqFont,
                simpleFontAtlasFile = bitmapAtlasFile,
                imgFile             = imgFile,
                fontAtlasFile       = fontAtlasFile,
                textureKind         = textureKind
            });
        }