Derive PartialEq for Vertex, Mesh, Row, Galley and Shape
This commit is contained in:
parent
6442d254a6
commit
30885b85f9
3 changed files with 5 additions and 5 deletions
|
@ -5,7 +5,7 @@ use emath::*;
|
|||
///
|
||||
/// Should be friendly to send to GPU as is.
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, Default)]
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq)]
|
||||
pub struct Vertex {
|
||||
/// Logical pixel coordinates (points).
|
||||
/// (0,0) is the top left corner of the screen.
|
||||
|
@ -21,7 +21,7 @@ pub struct Vertex {
|
|||
}
|
||||
|
||||
/// Textured triangles in two dimensions.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
#[derive(Clone, Debug, Default, PartialEq)]
|
||||
pub struct Mesh {
|
||||
/// Draw as triangles (i.e. the length is always multiple of three).
|
||||
///
|
||||
|
|
|
@ -7,7 +7,7 @@ use emath::*;
|
|||
/// A paint primitive such as a circle or a piece of text.
|
||||
/// Coordinates are all screen space points (not physical pixels).
|
||||
#[must_use = "Add a Shape to a Painter"]
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum Shape {
|
||||
/// Paint nothing. This can be useful as a placeholder.
|
||||
Noop,
|
||||
|
|
|
@ -23,7 +23,7 @@ use super::cursor::*;
|
|||
use emath::{pos2, NumExt, Rect, Vec2};
|
||||
|
||||
/// A collection of text locked into place.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
#[derive(Clone, Debug, Default, PartialEq)]
|
||||
pub struct Galley {
|
||||
/// The full text, including any an all `\n`.
|
||||
pub text: String,
|
||||
|
@ -39,7 +39,7 @@ pub struct Galley {
|
|||
}
|
||||
|
||||
/// A typeset piece of text on a single row.
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct Row {
|
||||
/// The start of each character, probably starting at zero.
|
||||
/// The last element is the end of the last character.
|
||||
|
|
Loading…
Reference in a new issue