OSDN Git Service

行を生成するメソッドをLineToIndexTableに移動した
[fooeditengine/FooEditEngine.git] / Core / Direct2D / D2DRenderCommon.cs
index c0c9ba9..fda591c 100644 (file)
@@ -872,43 +872,6 @@ namespace FooEditEngine
             return newLayout;
        }
 
-        public List<LineToIndexTableData> BreakLine(Document doc, LineToIndexTable layoutLineCollection, int startIndex, int endIndex, double wrapwidth)
-        {
-            List<LineToIndexTableData> output = new List<LineToIndexTableData>();
-
-            this.format.WordWrapping = DW.WordWrapping.Wrap;
-
-            foreach (string str in doc.GetLines(startIndex, endIndex))
-            {
-                DW.TextLayout layout = new DW.TextLayout(D2DRenderShared.DWFactory, str, this.format, (float)wrapwidth, float.MaxValue);
-
-                int i = startIndex;
-                foreach (DW.LineMetrics metrics in layout.GetLineMetrics())
-                {
-                    if (metrics.Length == 0 && metrics.NewlineLength == 0)
-                        continue;
-
-                    bool lineend = false;
-                    if (metrics.NewlineLength > 0)
-                        lineend = true;
-
-                    output.Add(layoutLineCollection.CreateLineToIndexTableData(i, (int)metrics.Length, lineend, null));
-                    i += Util.RoundUp(metrics.Length);
-                }
-
-                layout.Dispose();
-
-                startIndex += str.Length;
-            }
-
-            this.format.WordWrapping = DW.WordWrapping.NoWrap;
-
-            if (output.Count > 0)
-                output.Last().LineEnd = true;
-
-            return output;
-        }
-
         bool _Disposed = false;
         public void Dispose()
         {