public void BeginClipRect(Rectangle rect)
{
+ this.Context.PushClip(new RectangleGeometry(rect));
}
public void EndClipRect()
{
+ this.Context.Pop();
}
public List<LineToIndexTableData> BreakLine(Document doc, LineToIndexTable layoutLineCollection, int startIndex, int endIndex, double wrapwidth)
return output;
}
- public ITextLayout CreateLaytout(string str, SyntaxInfo[] syntaxCollection, IEnumerable<Marker> MarkerRanges, IEnumerable<Selection> SelectRanges)
+ public ITextLayout CreateLaytout(string str, SyntaxInfo[] syntaxCollection, IEnumerable<Marker> MarkerRanges, IEnumerable<Selection> SelectRanges, double wrapwidth)
{
- TextLayout layout = new TextLayout(str,this.FontFamily,this.FontSize,Brushes[this.Foreground],this.TextArea.Width);
- layout.TextWarpping = TextWrapping.NoWrap;
+ TextLayout layout;
+ if(wrapwidth == LineToIndexTable.NONE_BREAK_LINE)
+ {
+ layout = new TextLayout(str, this.FontFamily, this.FontSize, Brushes[this.Foreground], this.TextArea.Width);
+ layout.TextWarpping = TextWrapping.NoWrap;
+ }
+ else
+ {
+ layout = new TextLayout(str, this.FontFamily, this.FontSize, Brushes[this.Foreground], wrapwidth);
+ layout.TextWarpping = TextWrapping.Wrap;
+ }
layout.FlowDirection = this.RightToLeft ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
if (syntaxCollection != null)