<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,50 +2,6 @@
 #import &quot;NeoUtils.h&quot;
 
 
-/**
- * Calculates the typographic bounds of a line.
- */
-static CGSize MTLineGetTypographicSize(CTLineRef line) {
-  CGFloat ascent, descent, leading;
-  double w = CTLineGetTypographicBounds(line, &amp;ascent, &amp;descent, &amp;leading);
-  
-  if (w &gt; 0.0) {
-    const double h = ascent + descent + leading;
-    w -= CTLineGetTrailingWhitespaceWidth(line);
-    
-    return CGSizeMake(
-                      w &gt; CGFLOAT_MAX ? CGFLOAT_MAX : (CGFloat) w,
-                      h &gt; CGFLOAT_MAX ? CGFLOAT_MAX : (CGFloat) h
-                      );
-  }
-  return CGSizeZero;
-}
-
-static CGRect MTLineGetFirstRectForCharacterAtIndex(CTFrameRef frame, CTLineRef line, CFIndex lineIndex, CFIndex charIndex, Boolean verticalForms) {
-  const CGRect  box = MTFrameGetBoundingBox(frame);
-  const CGPoint origin = MTFrameGetLineOriginAtIndex(frame, lineIndex);
-  const CGFloat offset = CTLineGetOffsetForStringIndex(line, charIndex, NULL);
-  const CGSize  size = MTLineGetTypographicSize(line);
-  
-  if (CGSizeEqualToSize(size, CGSizeZero)) return CGRectNull;
-  if (!verticalForms) {
-    return CGRectMake(
-                      origin.x + CGRectGetMinX(box) + offset,
-                      origin.y - CGRectGetMinY(box),
-                      size.width - offset,
-                      size.height
-                      );
-  } else {
-    return CGRectMake(
-                      origin.x,
-                      origin.y - size.width + CGRectGetMinY(box),
-                      size.height,
-                      size.width - offset
-                      );
-  }
-}
-
-
 // ----------------------------------------------------------------
 // Constants
 // ----------------------------------------------------------------</diff>
      <filename>src/NeoTextView.m</filename>
    </modified>
    <modified>
      <diff>@@ -47,11 +47,26 @@ NS_INLINE BOOL NeoNSUIntegerCanAdvance(NSUInteger index, NSUInteger exclusiveLim
  * Returns the lowest index of the matching line in the frame,
  * or -1 if no line in the frame matched.
  */
-extern CFIndex MTFrameGetFirstLine(
-                                   CTFrameRef frame,
-                                   CFIndex charIndex,
-                                   CTLineRef *found,
-                                   CFRange *characterRange);
+extern
+CFIndex MTFrameGetFirstLine(
+                  CTFrameRef frame,
+                  CFIndex    charIndex,
+                  CTLineRef *found,
+                  CFRange   *characterRange);
+
+/**
+ * Calculates the typographic bounds of a line.
+ */
+extern
+CGSize MTLineGetTypographicSize(CTLineRef line);
+  
+extern
+CGRect MTLineGetFirstRectForCharacterAtIndex(
+                  CTFrameRef frame,
+                  CTLineRef  line,
+                  CFIndex    lineIndex,
+                  CFIndex    charIndex,
+                  Boolean    verticalForms);
 
 /**
  * Returns a line origin for a frame.</diff>
      <filename>src/NeoUtils.h</filename>
    </modified>
    <modified>
      <diff>@@ -2,10 +2,10 @@
 
 
 CFIndex MTFrameGetFirstLine(
-                            CTFrameRef frame,
-                            CFIndex    charIndex,
-                            CTLineRef *found,
-                            CFRange   *characterRange)
+              CTFrameRef frame,
+              CFIndex    charIndex,
+              CTLineRef *found,
+              CFRange   *characterRange)
 {
   const CFArrayRef lines = CTFrameGetLines(frame);
   CFIndex l = 0, u = CFArrayGetCount(lines);
@@ -28,4 +28,50 @@ CFIndex MTFrameGetFirstLine(
   return -1;
 }
 
+CGSize MTLineGetTypographicSize(CTLineRef line) {
+  CGFloat ascent, descent, leading;
+  double w = CTLineGetTypographicBounds(line, &amp;ascent, &amp;descent, &amp;leading);
+  
+  if (w &gt; 0.0) {
+    const double h = ascent + descent + leading;
+    w -= CTLineGetTrailingWhitespaceWidth(line);
+    
+    return CGSizeMake(
+                      w &gt; CGFLOAT_MAX ? CGFLOAT_MAX : (CGFloat) w,
+                      h &gt; CGFLOAT_MAX ? CGFLOAT_MAX : (CGFloat) h
+                      );
+  }
+  return CGSizeZero;
+}
+
+CGRect MTLineGetFirstRectForCharacterAtIndex(
+             CTFrameRef frame,
+             CTLineRef  line,
+             CFIndex    lineIndex,
+             CFIndex    charIndex,
+             Boolean    verticalForms)
+{
+  const CGRect  box = MTFrameGetBoundingBox(frame);
+  const CGPoint origin = MTFrameGetLineOriginAtIndex(frame, lineIndex);
+  const CGFloat offset = CTLineGetOffsetForStringIndex(line, charIndex, NULL);
+  const CGSize  size = MTLineGetTypographicSize(line);
+  
+  if (CGSizeEqualToSize(size, CGSizeZero)) return CGRectNull;
+  if (!verticalForms) {
+    return CGRectMake(
+                      origin.x + CGRectGetMinX(box) + offset,
+                      origin.y - CGRectGetMinY(box),
+                      size.width - offset,
+                      size.height
+                      );
+  } else {
+    return CGRectMake(
+                      origin.x,
+                      origin.y - size.width + CGRectGetMinY(box),
+                      size.height,
+                      size.width - offset
+                      );
+  }
+}
+
 </diff>
      <filename>src/NeoUtils.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>280526b7ec5739140612d41d55aadb39099915c7</id>
    </parent>
  </parents>
  <author>
    <name>Takanori Ishikawa</name>
    <email>takanori.ishikawa@gmail.com</email>
  </author>
  <url>http://github.com/ishikawa/neuro/commit/4708ef79895c5ef0dc91051c2f624017d17889da</url>
  <id>4708ef79895c5ef0dc91051c2f624017d17889da</id>
  <committed-date>2009-08-04T07:48:16-07:00</committed-date>
  <authored-date>2009-08-04T07:48:16-07:00</authored-date>
  <message>Moved MT** function to NeoUtils</message>
  <tree>259d23a99d3747142333f5f2812e471784975488</tree>
  <committer>
    <name>Takanori Ishikawa</name>
    <email>takanori.ishikawa@gmail.com</email>
  </committer>
</commit>
