ReaderT icon indicating copy to clipboard operation
ReaderT copied to clipboard

笔记改为目前流行的下划线方式,有没有研究。

Open yunxingyu opened this issue 5 years ago • 1 comments

我们有个需求,需要改变笔记标记样式,改为下划线。通过ZLAndroidPaintContext类能获取外框点集合,但是划线不知道怎么实现 @Override public void fillPolygon(int[] xs, int[] ys) { final Path path = new Path(); final int last = xs.length - 1; path.moveTo(xs[last], ys[last]); for (int i = 0; i <= last; ++i) { path.lineTo(xs[i], ys[i]); } myCanvas.drawPath(path, myFillPaint); }

yunxingyu avatar Jan 14 '20 09:01 yunxingyu

在HorizontalConvexHull类里将addRect方法里的if (r.bottom > bottom)判断改成if (r.bottom >= bottom),因为>会导致丢失部分矩形集合信息; 然后在HorizontalConvexHull的draw方法里将myRectangles集合所有Rect的底部用context.drawLine(rect.left, rect.bottom, rect.right, rect.bottom)绘制出来即可。 建议添加一个Hull.DrawMode.Underline类型,然后根据类型做判断处理。 希望能对你有所帮助,具体的细节优化你自己看看。

HaowenLee avatar Jan 15 '20 14:01 HaowenLee