Microsoft.VisualStudio.R.Package.DataInspect.TextVisual.Draw C# (CSharp) Method

Draw() public method

public Draw ( ) : bool
return bool
        public bool Draw() {
            if (_drawValid) {
                return false;
            }

            DrawingContext dc = RenderOpen();
            try {
                var formattedText = GetFormattedText();
                double offset;
                Size = GetRenderSize(formattedText, out offset);
                TextAlignment = IsNumerical(Text) ? TextAlignment.Right : TextAlignment.Left;

                dc.DrawText(formattedText, new Point(offset, 0));
                _drawValid = true;
                return true;
            } finally {
                dc.Close();
            }
        }