Example #1
0
 /// <summary>
 /// Constructor for new glyph.
 /// The scale will be set to a value of 1.0 and atlas index to 0.
 /// </summary>
 /// <param name="index">The index of the glyph in the font file.</param>
 /// <param name="metrics">The metrics of the glyph.</param>
 /// <param name="glyphRect">The GlyphRect defining the position of the glyph in the atlas texture.</param>
 public Glyph(uint index, GlyphMetrics metrics, GlyphRect glyphRect)
 {
     m_Index      = index;
     m_Metrics    = metrics;
     m_GlyphRect  = glyphRect;
     m_Scale      = 1;
     m_AtlasIndex = 0;
 }
Example #2
0
 /// <summary>
 /// Constructor for new glyph.
 /// </summary>
 /// <param name="index">The index of the glyph in the font file.</param>
 /// <param name="metrics">The metrics of the glyph.</param>
 /// <param name="glyphRect">The GlyphRect defining the position of the glyph in the atlas texture.</param>
 /// <param name="scale">The relative scale of the glyph.</param>
 /// <param name="atlasIndex">The index of the atlas texture that contains the glyph.</param>
 public Glyph(uint index, GlyphMetrics metrics, GlyphRect glyphRect, float scale, int atlasIndex)
 {
     m_Index      = index;
     m_Metrics    = metrics;
     m_GlyphRect  = glyphRect;
     m_Scale      = scale;
     m_AtlasIndex = atlasIndex;
 }
Example #3
0
 /// <summary>
 /// Constructor for a new glyph
 /// </summary>
 /// <param name="glyph">Glyph whose values are copied to the new glyph.</param>
 public Glyph(Glyph glyph)
 {
     m_Index      = glyph.index;
     m_Metrics    = glyph.metrics;
     m_GlyphRect  = glyph.glyphRect;
     m_Scale      = glyph.scale;
     m_AtlasIndex = glyph.atlasIndex;
 }
Example #4
0
 /// <summary>
 /// Constructor for a new glyph
 /// </summary>
 /// <param name="glyphStruct">Glyph whose values are copied to the new glyph.</param>
 internal Glyph(GlyphMarshallingStruct glyphStruct)
 {
     m_Index      = glyphStruct.index;
     m_Metrics    = glyphStruct.metrics;
     m_GlyphRect  = glyphStruct.glyphRect;
     m_Scale      = glyphStruct.scale;
     m_AtlasIndex = glyphStruct.atlasIndex;
 }
Example #5
0
 /// <summary>
 /// Constructor for a new glyph.
 /// </summary>
 public Glyph()
 {
     m_Index      = 0;
     m_Metrics    = new GlyphMetrics();
     m_GlyphRect  = new GlyphRect();
     m_Scale      = 1;
     m_AtlasIndex = 0;
 }
Example #6
0
 public Glyph()
 {
     this.m_Index      = 0u;
     this.m_Metrics    = default(GlyphMetrics);
     this.m_GlyphRect  = default(GlyphRect);
     this.m_Scale      = 1f;
     this.m_AtlasIndex = 0;
 }
Example #7
0
 public Glyph(uint index, GlyphMetrics metrics, GlyphRect glyphRect)
 {
     this.m_Index      = index;
     this.m_Metrics    = metrics;
     this.m_GlyphRect  = glyphRect;
     this.m_Scale      = 1f;
     this.m_AtlasIndex = 0;
 }
 public SpriteGlyph(uint index, GlyphMetrics metrics, GlyphRect glyphRect, float scale, int atlasIndex)
 {
     base.index      = index;
     base.metrics    = metrics;
     base.glyphRect  = glyphRect;
     base.scale      = scale;
     base.atlasIndex = atlasIndex;
 }
Example #9
0
 /// <summary>
 /// Constructor for new sprite glyph.
 /// </summary>
 /// <param name="index">Index of the sprite glyph.</param>
 /// <param name="metrics">Metrics which define the position of the glyph in the context of text layout.</param>
 /// <param name="glyphRect">GlyphRect which defines the coordinates of the glyph in the atlas texture.</param>
 /// <param name="scale">Scale of the glyph.</param>
 /// <param name="atlasIndex">Index of the atlas texture that contains the glyph.</param>
 public SpriteGlyph(uint index, GlyphMetrics metrics, GlyphRect glyphRect, float scale, int atlasIndex)
 {
     this.index      = index;
     this.metrics    = metrics;
     this.glyphRect  = glyphRect;
     this.scale      = scale;
     this.atlasIndex = atlasIndex;
 }