Rename viewport to clip_bounds
This commit is contained in:
parent
43a7cc2222
commit
b526ce4958
11 changed files with 53 additions and 50 deletions
|
|
@ -32,8 +32,8 @@ pub enum Primitive<T> {
|
|||
vertical_alignment: alignment::Vertical,
|
||||
/// The shaping strategy of the text.
|
||||
shaping: text::Shaping,
|
||||
/// The viewport of the text.
|
||||
viewport: Rectangle,
|
||||
/// The clip bounds of the text.
|
||||
clip_bounds: Rectangle,
|
||||
},
|
||||
/// A paragraph primitive
|
||||
Paragraph {
|
||||
|
|
@ -43,8 +43,8 @@ pub enum Primitive<T> {
|
|||
position: Point,
|
||||
/// The color of the paragraph.
|
||||
color: Color,
|
||||
/// The viewport of the paragraph.
|
||||
viewport: Rectangle,
|
||||
/// The clip bounds of the paragraph.
|
||||
clip_bounds: Rectangle,
|
||||
},
|
||||
/// An editor primitive
|
||||
Editor {
|
||||
|
|
@ -54,8 +54,8 @@ pub enum Primitive<T> {
|
|||
position: Point,
|
||||
/// The color of the editor.
|
||||
color: Color,
|
||||
/// The viewport of the editor.
|
||||
viewport: Rectangle,
|
||||
/// The clip bounds of the editor.
|
||||
clip_bounds: Rectangle,
|
||||
},
|
||||
/// A quad primitive
|
||||
Quad {
|
||||
|
|
|
|||
|
|
@ -164,13 +164,13 @@ where
|
|||
paragraph: &Self::Paragraph,
|
||||
position: Point,
|
||||
color: Color,
|
||||
viewport: Rectangle,
|
||||
clip_bounds: Rectangle,
|
||||
) {
|
||||
self.primitives.push(Primitive::Paragraph {
|
||||
paragraph: paragraph.downgrade(),
|
||||
position,
|
||||
color,
|
||||
viewport,
|
||||
clip_bounds,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -179,13 +179,13 @@ where
|
|||
editor: &Self::Editor,
|
||||
position: Point,
|
||||
color: Color,
|
||||
viewport: Rectangle,
|
||||
clip_bounds: Rectangle,
|
||||
) {
|
||||
self.primitives.push(Primitive::Editor {
|
||||
editor: editor.downgrade(),
|
||||
position,
|
||||
color,
|
||||
viewport,
|
||||
clip_bounds,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -194,7 +194,7 @@ where
|
|||
text: Text<'_, Self::Font>,
|
||||
position: Point,
|
||||
color: Color,
|
||||
viewport: Rectangle,
|
||||
clip_bounds: Rectangle,
|
||||
) {
|
||||
self.primitives.push(Primitive::Text {
|
||||
content: text.content.to_string(),
|
||||
|
|
@ -206,7 +206,7 @@ where
|
|||
horizontal_alignment: text.horizontal_alignment,
|
||||
vertical_alignment: text.vertical_alignment,
|
||||
shaping: text.shaping,
|
||||
viewport,
|
||||
clip_bounds,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue