Exemplo n.º 1
0
 public void AppendChat(string text, SdlDotNet.Widgets.CharRenderOptions[] renderOptions)
 {
     lblChat.AppendText(text, renderOptions);
     if (lblChat.Text.Length > 10000)
     {
         GlyphRenderData[] newRenderOptions = new GlyphRenderData[10000];
         lblChat.CharRenderOptions.CopyTo(lblChat.CharRenderOptions.Count - 10000, newRenderOptions, 0, 10000);
         lblChat.SetText(newRenderOptions);
     }
     lblChat.ScrollToBottom();
 }
Exemplo n.º 2
0
            public void EndGlyph()
            {
                GlyphRenderData renderData = default;

                // has the glyoh been rendedered already????
                if (this.raterizationRequired)
                {
                    IPath path = this.builder.Build();

                    if (this.renderFill)
                    {
                        renderData.FillMap = this.Render(path);
                    }

                    if (this.renderOutline)
                    {
                        if (this.Pen.StrokePattern.Length == 0)
                        {
                            path = path.GenerateOutline(this.Pen.StrokeWidth);
                        }
                        else
                        {
                            path = path.GenerateOutline(this.Pen.StrokeWidth, this.Pen.StrokePattern);
                        }

                        renderData.OutlineMap = this.Render(path);
                    }

                    this.glyphData[this.currentGlyphRenderParams] = renderData;
                }
                else
                {
                    renderData = this.glyphData[this.currentGlyphRenderParams];
                }

                if (this.renderFill)
                {
                    this.FillOperations.Add(new DrawingOperation
                    {
                        Location = this.currentRenderPosition,
                        Map      = renderData.FillMap
                    });
                }

                if (this.renderOutline)
                {
                    this.OutlineOperations.Add(new DrawingOperation
                    {
                        Location = this.currentRenderPosition,
                        Map      = renderData.OutlineMap
                    });
                }
            }
Exemplo n.º 3
0
 public void AppendChat(string text, SdlDotNet.Widgets.CharRenderOptions[] renderOptions)
 {
     lblChat.AppendText(text, renderOptions);
     if (lblChat.Text.Length > 10000) {
         GlyphRenderData[] newRenderOptions = new GlyphRenderData[10000];
         lblChat.CharRenderOptions.CopyTo(lblChat.CharRenderOptions.Count - 10000, newRenderOptions, 0, 10000);
         lblChat.SetText(newRenderOptions);
     }
     lblChat.ScrollToBottom();
 }