Skip to content

Commit

Permalink
Update docs on RenderContext::draw_text
Browse files Browse the repository at this point in the history
- closes #509
  • Loading branch information
cmyr committed Apr 13, 2022
1 parent a873ddd commit 436c5d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions piet/src/render_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ where

/// Draw a [`TextLayout`].
///
/// The `pos` parameter specifies the baseline of the left starting place of
/// the text. Note: this is true even if the text is right-to-left.
/// The `pos` parameter specifies the upper-left corner of the layout object
/// (even for right-to-left text). To draw on a baseline, you can use
/// [TextLayout::line_metric] to get the baseline position of a specific line.
fn draw_text(&mut self, layout: &Self::TextLayout, pos: impl Into<Point>);

/// Save the context state.
Expand Down

0 comments on commit 436c5d9

Please sign in to comment.