Beispiel #1
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="device"></param>
 /// <param name="c">文字</param>
 /// <param name="x">x</param>
 /// <param name="y">y</param>
 /// <param name="fontsize">フォントサイズ</param>
 /// <param name="facename">フォント名</param>
 /// <param name="color">色</param>
 public TextureChar(PPDDevice device, char c, float x, float y, float fontsize, string facename, Color4 color)
 {
     this.device   = device;
     Position      = new Vector2(x, y);
     this.c        = c;
     this.color    = color;
     fontsize      = PPDSetting.Setting.GetAdjustedFontSize(fontsize);
     this.facename = facename;
     isSpace       = CheckSpace();
     cci           = device.GetModule <CharCacheManager>().Get(fontsize, facename, this.c);
     vertices      = device.GetModule <ShaderCommon>().CreateVertex(4);
 }
Beispiel #2
0
 /// <summary>
 /// リソースを破棄します
 /// </summary>
 protected override void DisposeResource()
 {
     if (cci != null)
     {
         cci.Decrement();
         cci = null;
     }
     if (vertices != null)
     {
         vertices.Dispose();
         vertices = null;
     }
 }