mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove gfx_traits::color.
This commit is contained in:
parent
1f109dd1b2
commit
a9e3fe75b5
11 changed files with 26 additions and 81 deletions
|
@ -13,7 +13,6 @@ path = "lib.rs"
|
|||
azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
|
||||
canvas_traits = {path = "../canvas_traits"}
|
||||
euclid = "0.10.1"
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
gleam = "0.2.8"
|
||||
ipc-channel = "0.5"
|
||||
log = "0.3.5"
|
||||
|
|
|
@ -2,16 +2,15 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use azure::azure::{AzColor, AzFloat};
|
||||
use azure::azure::AzFloat;
|
||||
use azure::azure_hl::{AntialiasMode, CapStyle, CompositionOp, JoinStyle};
|
||||
use azure::azure_hl::{BackendType, DrawOptions, DrawTarget, Pattern, StrokeOptions, SurfaceFormat};
|
||||
use azure::azure_hl::{ColorPattern, DrawSurfaceOptions, Filter, PathBuilder};
|
||||
use azure::azure_hl::{Color, ColorPattern, DrawSurfaceOptions, Filter, PathBuilder};
|
||||
use canvas_traits::*;
|
||||
use euclid::matrix2d::Matrix2D;
|
||||
use euclid::point::Point2D;
|
||||
use euclid::rect::Rect;
|
||||
use euclid::size::Size2D;
|
||||
use gfx_traits::color;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use ipc_channel::ipc::IpcSharedMemory;
|
||||
use num_traits::ToPrimitive;
|
||||
|
@ -73,7 +72,7 @@ struct CanvasPaintState<'a> {
|
|||
shadow_offset_x: f64,
|
||||
shadow_offset_y: f64,
|
||||
shadow_blur: f64,
|
||||
shadow_color: AzColor,
|
||||
shadow_color: Color,
|
||||
}
|
||||
|
||||
impl<'a> CanvasPaintState<'a> {
|
||||
|
@ -86,14 +85,14 @@ impl<'a> CanvasPaintState<'a> {
|
|||
|
||||
CanvasPaintState {
|
||||
draw_options: DrawOptions::new(1.0, CompositionOp::Over, antialias),
|
||||
fill_style: Pattern::Color(ColorPattern::new(color::black())),
|
||||
stroke_style: Pattern::Color(ColorPattern::new(color::black())),
|
||||
fill_style: Pattern::Color(ColorPattern::new(Color::black())),
|
||||
stroke_style: Pattern::Color(ColorPattern::new(Color::black())),
|
||||
stroke_opts: StrokeOptions::new(1.0, JoinStyle::MiterOrBevel, CapStyle::Butt, 10.0, &[]),
|
||||
transform: Matrix2D::identity(),
|
||||
shadow_offset_x: 0.0,
|
||||
shadow_offset_y: 0.0,
|
||||
shadow_blur: 0.0,
|
||||
shadow_color: color::transparent(),
|
||||
shadow_color: Color::transparent(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -665,7 +664,7 @@ impl<'a> CanvasPaintThread<'a> {
|
|||
self.state.shadow_blur = value;
|
||||
}
|
||||
|
||||
fn set_shadow_color(&mut self, value: AzColor) {
|
||||
fn set_shadow_color(&mut self, value: Color) {
|
||||
self.state.shadow_color = value;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ extern crate azure;
|
|||
extern crate canvas_traits;
|
||||
extern crate core;
|
||||
extern crate euclid;
|
||||
extern crate gfx_traits;
|
||||
extern crate gleam;
|
||||
extern crate ipc_channel;
|
||||
#[macro_use]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue