Index: include/core/SkPaint.h |
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h |
index 51e8848a00b6f3ad07d6ed72a513941377cb5247..9e18b4a86d68e472f2bc1879cedc243d878a3417 100644 |
--- a/include/core/SkPaint.h |
+++ b/include/core/SkPaint.h |
@@ -883,15 +883,59 @@ public: |
SkRect bounds[] = NULL) const; |
/** Return the path (outline) for the specified text. |
- Note: just like SkCanvas::drawText, this will respect the Align setting |
- in the paint. |
- */ |
+ * Note: just like SkCanvas::drawText, this will respect the Align setting |
+ * in the paint. |
+ * |
+ * @param text the text |
+ * @param length number of bytes of text |
+ * @param x The x-coordinate of the origin of the text. |
+ * @param y The y-coordinate of the origin of the text. |
+ * @param path The outline of the text. |
+ */ |
void getTextPath(const void* text, size_t length, SkScalar x, SkScalar y, |
SkPath* path) const; |
+ /** Return the path (outline) for the specified text. |
+ * Note: just like SkCanvas::drawText, this will respect the Align setting |
+ * in the paint. |
+ * |
+ * @param text the text |
+ * @param length number of bytes of text |
+ * @param pos array of positions, used to position each character |
+ * @param path The outline of the text. |
+ */ |
void getPosTextPath(const void* text, size_t length, |
const SkPoint pos[], SkPath* path) const; |
+ /** Return the number of intervals that intersect the intercept along the axis of the advance. |
+ * This permits constructing an underline that skips the descenders. |
+ * |
+ * @param text the text |
+ * @param length number of bytes of text |
+ * @param x The x-coordinate of the origin of the text. |
+ * @param y The y-coordinate of the origin of the text. |
+ * @param bounds The lower and upper line parallel to the advance. |
+ * @param array If not null, the found intersections. |
+ * |
+ * @return The number of intersections. |
+ */ |
+ int getTextIntercepts(const void* text, size_t length, SkScalar x, SkScalar y, |
+ const SkScalar bounds[2], SkScalar* array) const; |
f(malita)
2016/02/08 14:20:27
It's a bit unclear how to size 'array' effectively
caryclark
2016/02/09 19:10:57
Done.
|
+ |
+ /** Return the number of intervals that intersect the intercept along the axis of the advance. |
+ * This permits constructing an underline that skips the descenders. |
+ * |
+ * @param text the text |
+ * @param length number of bytes of text |
+ * @param pos array of positions, used to position each character |
+ * @param bounds The lower and upper line parallel to the advance. |
+ * @param array If not null, the glyph bounds contained by the advance parallel lines. |
+ * |
+ * @return The number of glyph bounds. |
+ */ |
+ int getPosTextIntercepts(const void* text, size_t length, const SkPoint pos[], |
+ const SkScalar bounds[2], SkScalar* array) const; |
+ |
/** |
* Return a rectangle that represents the union of the bounds of all |
* of the glyphs, but each one positioned at (0,0). This may be conservatively large, and |
@@ -1089,7 +1133,7 @@ private: |
friend class GrTextUtils; |
friend class GrGLPathRendering; |
friend class SkScalerContext; |
- friend class SkTextToPathIter; |
+ friend class SkTextBaseIter; |
friend class SkCanonicalizePaint; |
}; |