public Text.RenderData Clone()
            {
                Text.RenderData renderData = new Text.RenderData(GlyphCount);

                for (int i = 0; i < GlyphCount; i++)
                {
                    renderData._glyphs[i] = _glyphs[i].Clone();
                }

                renderData.GlyphCount = GlyphCount;
                return(renderData);
            }
Beispiel #2
0
        public void DrawString(Font font, Text.RenderData glyphs, Rectangle destinationRectangle, float rotation, Vector2 scale, ImageFlip flip, Color color, Vector2 origin, Vector2 scroll, Shader shader = null, IShaderParameters shaderParameters = null, float layerDepth = 1f)
        {
            if (Batch.BatchMode == BatchMode.Immediate)
            {
                PrepareBeforeRender();
                Batch.DrawString(font, glyphs, destinationRectangle, rotation, scale, flip, color, origin, scroll, shader, shaderParameters, layerDepth);
                AfterRender();
                return;
            }

            Batch.DrawString(font, glyphs, destinationRectangle, rotation, scale, flip, color, origin, scroll, shader, shaderParameters, layerDepth);
        }