Exemplo n.º 1
0
        public FontSystem(FontSystemParams p)
        {
            _params_ = p;

            _itw = 1.0f / _params_.Width;
            _ith = 1.0f / _params_.Height;
            ClearState();
        }
Exemplo n.º 2
0
        public FontSystem(FontSystemParams p)
        {
            _params_ = p;

            atlas        = new FontAtlas(_params_.Width, _params_.Height, 256);
            _fonts       = new Font[4];
            _fontsNumber = 0;
            _itw         = 1.0f / _params_.Width;
            _ith         = 1.0f / _params_.Height;
            _texData     = new byte[_params_.Width * _params_.Height];
            Array.Clear(_texData, 0, _texData.Length);
            _dirtyRect[0] = _params_.Width;
            _dirtyRect[1] = _params_.Height;
            _dirtyRect[2] = 0;
            _dirtyRect[3] = 0;
            AddWhiteRect(2, 2);
            ClearState();
        }
Exemplo n.º 3
0
        public FontSystem(FontSystemParams p)
        {
            _params_ = p;

            AtlasFull = () => ResetAtlas();

            _atlas     = new FontAtlas(_params_.Width, _params_.Height, 256);
            _itw       = 1.0f / _params_.Width;
            _ith       = 1.0f / _params_.Height;
            _texData   = new byte[_params_.Width * _params_.Height];
            _colorData = new Color[_params_.Width * _params_.Height];
            Array.Clear(_texData, 0, _texData.Length);
            _dirtyRect[0] = _params_.Width;
            _dirtyRect[1] = _params_.Height;
            _dirtyRect[2] = 0;
            _dirtyRect[3] = 0;
            AddWhiteRect(2, 2);
            ClearState();
        }