提交 28380556 编写于 作者: A Adam Barth

Remove Paragraph#paint

We now use Canvas#drawParagraph.
上级 a8ea37b7
......@@ -407,6 +407,9 @@ class Canvas extends NativeFieldWrapperClass2 {
/// [PictureRecorder].
void drawPicture(Picture picture) native "Canvas_drawPicture";
/// Draws the text in the given paragraph into this canvas at the given offset.
///
/// Valid only after [Paragraph.layout] has been called on the paragraph.
void drawParagraph(Paragraph paragraph, Offset offset) native "Canvas_drawParagraph";
void drawVertices(VertexMode vertexMode,
......
......@@ -550,8 +550,8 @@ class TextPosition {
///
/// To create a Paragraph object, use a [ParagraphBuilder].
///
/// Paragraph objects can be displayed on a [Canvas] using the [paint]
/// method.
/// Paragraph objects can be displayed on a [Canvas] using the
/// [Canvas.drawParagraph] method.
abstract class Paragraph extends NativeFieldWrapperClass2 {
/// Creates an uninitialized Paragraph object.
///
......@@ -612,11 +612,6 @@ abstract class Paragraph extends NativeFieldWrapperClass2 {
/// function before painting or reading geometry from this paragraph.
void layout() native "Paragraph_layout";
/// Draws the text in this paragraph into the given canvas at the given offset.
///
/// Valid only after [layout] has been called.
void paint(Canvas canvas, Offset offset) native "Paragraph_paint";
/// Returns a list of text boxes that enclose the given text range.
List<TextBox> getBoxesForRange(int start, int end) native "Paragraph_getRectsForRange";
......
......@@ -36,8 +36,7 @@ IMPLEMENT_WRAPPERTYPEINFO(ui, Paragraph);
V(Paragraph, ideographicBaseline) \
V(Paragraph, layout) \
V(Paragraph, getRectsForRange) \
V(Paragraph, getPositionForOffset) \
V(Paragraph, paint)
V(Paragraph, getPositionForOffset)
DART_BIND_ALL(Paragraph, FOR_EACH_BINDING)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册