LayoutFarm.Text.InternalTextLayerController.DoFormatSelection C# (CSharp) 메소드

DoFormatSelection() 공개 메소드

public DoFormatSelection ( TextSpanStyle textStyle ) : void
textStyle TextSpanStyle
리턴 void
        public void DoFormatSelection(TextSpanStyle textStyle)
        {
            int startLineNum = textLineWriter.LineNumber;
            int startCharIndex = textLineWriter.CharIndex;
            SplitSelectedText();
            VisualSelectionRange selRange = SelectionRange;
            if (selRange != null)
            {
                foreach (EditableRun r in selRange.GetPrintableTextRunIter())
                {
                    r.SetStyle(textStyle);
                }

                this.updateJustCurrentLine = selectionRange.IsOnTheSameLine;
                CancelSelect();
                CharIndex++;
                CharIndex--;
            }
        }