Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FontReference"/> struct.
 /// </summary>
 /// <param name="font">The font.</param>
 public FontReference(Font font)
 {
     if (font)
     {
         _font = font.Asset;
         _size = font.Size;
     }
     else
     {
         _font = null;
         _size = 30;
     }
     _cachedFont = font;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FontReference"/> struct.
 /// </summary>
 public FontReference()
 {
     _font       = null;
     _size       = 30;
     _cachedFont = null;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FontReference"/> struct.
 /// </summary>
 /// <param name="font">The font.</param>
 /// <param name="size">The font size.</param>
 public FontReference(FontAsset font, int size)
 {
     _font       = font;
     _size       = size;
     _cachedFont = null;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FontReference"/> struct.
 /// </summary>
 /// <param name="font">The font.</param>
 public FontReference(Font font)
 {
     _font       = font?.Asset;
     _size       = font?.Size ?? 30;
     _cachedFont = font;
 }