예제 #1
0
 /// <summary>
 /// Executes the glyph shader.
 /// </summary>
 /// <param name="context">The glyph shader contxt in which to execute the shader.</param>
 /// <param name="data">The data for the glyph which is being drawn.</param>
 /// <param name="index">The index of the glyph within its source string.</param>
 public void Execute(ref GlyphShaderContext context, ref GlyphData data, Int32 index)
 {
     if (glyphShaderScopedStack != null)
     {
         foreach (var shader in glyphShaderScopedStack)
             shader.Value.Execute(ref context, ref data, index);
     }
     else if (glyphShaderStack != null)
     {
         foreach (var shader in glyphShaderStack)
             shader.Execute(ref context, ref data, index);
     }
     else if (glyphShader != null)
     {
         glyphShader.Execute(ref context, ref data, index);
     }
 }
예제 #2
0
 /// <summary>
 /// Executes the glyph shader.
 /// </summary>
 /// <param name="context">The glyph shader contxt in which to execute the shader.</param>
 /// <param name="data">The data for the glyph which is being drawn.</param>
 /// <param name="index">The index of the glyph within its source string.</param>
 public void Execute(ref GlyphShaderContext context, ref GlyphData data, Int32 index)
 {
     if (glyphShaderScopedStack != null)
     {
         foreach (var shader in glyphShaderScopedStack)
         {
             shader.Value.Execute(ref context, ref data, index);
         }
     }
     else if (glyphShaderStack != null)
     {
         foreach (var shader in glyphShaderStack)
         {
             shader.Execute(ref context, ref data, index);
         }
     }
     else if (glyphShader != null)
     {
         glyphShader.Execute(ref context, ref data, index);
     }
 }
예제 #3
0
 /// <summary>
 /// Executes the glyph shader
 /// </summary>
 /// <param name="context">The current glyph shader context.</param>
 /// <param name="data">The data for the glyph being drawn.</param>
 /// <param name="index">The index of the glyph within its source string.</param>
 public abstract void Execute(ref GlyphShaderContext context, ref GlyphData data, Int32 index);
 public override void Execute(ref GlyphShaderContext context, ref GlyphData data, Int32 index)
 {
     data.Color = Colors[index % Colors.Length];
 }