Move Defaults from iced_graphics to iced_native

This commit is contained in:
Héctor Ramón Jiménez 2021-10-18 15:19:04 +07:00
parent 54a9a232f8
commit edea093350
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
39 changed files with 166 additions and 192 deletions

View file

@ -10,13 +10,11 @@ mod rainbow {
// Of course, you can choose to make the implementation renderer-agnostic,
// if you wish to, by creating your own `Renderer` trait, which could be
// implemented by `iced_wgpu` and other renderers.
use iced_graphics::{
triangle::{Mesh2D, Vertex2D},
Backend, Defaults, Primitive, Renderer,
};
use iced_graphics::renderer::{self, Renderer};
use iced_graphics::Backend;
use iced_native::{
layout, mouse, Element, Hasher, Layout, Length, Point, Rectangle, Size,
Vector, Widget,
layout, Element, Hasher, Layout, Length, Point, Rectangle, Size, Widget,
};
pub struct Rainbow;
@ -54,11 +52,12 @@ mod rainbow {
fn draw(
&self,
_renderer: &mut Renderer<B>,
_defaults: &Defaults,
_style: &renderer::Style,
_layout: Layout<'_>,
_cursor_position: Point,
_viewport: &Rectangle,
) {
// use iced_graphics::triangle::{Mesh2D, Vertex2D};
// let b = layout.bounds();
// // R O Y G B I V