Remove nalgebra dependency

- Implement our own `Point` and `Vector` types
  - Make `Rectangle` not generic
This commit is contained in:
Héctor Ramón Jiménez 2019-08-31 04:31:13 +02:00
parent 343cafa1ee
commit eecac7b5d1
18 changed files with 69 additions and 31 deletions

View file

@ -29,7 +29,7 @@ impl button::Renderer for Renderer<'_> {
fn draw(
&mut self,
cursor_position: iced::Point,
mut bounds: iced::Rectangle<f32>,
mut bounds: iced::Rectangle,
state: &button::State,
label: &str,
class: button::Class,

View file

@ -14,8 +14,8 @@ impl checkbox::Renderer for Renderer<'_> {
fn draw(
&mut self,
cursor_position: iced::Point,
bounds: iced::Rectangle<f32>,
text_bounds: iced::Rectangle<f32>,
bounds: iced::Rectangle,
text_bounds: iced::Rectangle,
is_checked: bool,
) -> MouseCursor {
let mouse_over = bounds.contains(cursor_position)

View file

@ -14,8 +14,8 @@ impl radio::Renderer for Renderer<'_> {
fn draw(
&mut self,
cursor_position: Point,
bounds: Rectangle<f32>,
bounds_with_label: Rectangle<f32>,
bounds: Rectangle,
bounds_with_label: Rectangle,
is_selected: bool,
) -> MouseCursor {
let mouse_over = bounds_with_label.contains(cursor_position);

View file

@ -22,7 +22,7 @@ impl slider::Renderer for Renderer<'_> {
fn draw(
&mut self,
cursor_position: Point,
bounds: Rectangle<f32>,
bounds: Rectangle,
state: &slider::State,
range: RangeInclusive<f32>,
value: f32,

View file

@ -69,7 +69,7 @@ impl text::Renderer<Color> for Renderer<'_> {
fn draw(
&mut self,
bounds: iced::Rectangle<f32>,
bounds: iced::Rectangle,
content: &str,
size: f32,
color: Option<Color>,