public Boolean ProcessGlyphShaderPass(ref GlyphShaderContext glyphShaderContext, ref GlyphData glyphData, Int32 i, ref Int32 length)
            {
                if (glyphShaderContext.IsValid)
                {
                    PopulateGlyphData(ref glyphData);
                    GlyphShaderPass++;

                    glyphShaderContext.Execute(ref glyphData, glyphShaderContext.SourceOffset + i);

                    UpdateFromGlyphData(ref glyphData);
                    if (glyphData.DirtyUnicodeCodePoint)
                    {
                        length = 0;
                        return(true);
                    }
                }

                GlyphShaderPass = 0;
                return(false);
            }
示例#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);