mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Implement DrawOptions.set_alpha()
This commit is contained in:
parent
ba1fa0835f
commit
4aad4ff858
2 changed files with 3 additions and 3 deletions
|
@ -358,7 +358,7 @@ pub enum DrawOptions {
|
|||
#[cfg(feature = "canvas2d-azure")]
|
||||
Azure(azure::azure_hl::DrawOptions),
|
||||
#[cfg(feature = "canvas2d-raqote")]
|
||||
Raqote(()),
|
||||
Raqote(raqote::DrawOptions),
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
|
|
|
@ -73,7 +73,7 @@ impl Backend for RaqoteBackend {
|
|||
impl<'a> CanvasPaintState<'a> {
|
||||
pub fn new(_antialias: AntialiasMode) -> CanvasPaintState<'a> {
|
||||
CanvasPaintState {
|
||||
draw_options: DrawOptions::Raqote(()),
|
||||
draw_options: DrawOptions::Raqote(raqote::DrawOptions::new()),
|
||||
fill_style: Pattern::Raqote(()),
|
||||
stroke_style: Pattern::Raqote(()),
|
||||
stroke_opts: StrokeOptions::Raqote(PhantomData),
|
||||
|
@ -112,7 +112,7 @@ impl<'a> StrokeOptions<'a> {
|
|||
impl DrawOptions {
|
||||
pub fn set_alpha(&mut self, _val: f32) {
|
||||
match self {
|
||||
DrawOptions::Raqote(()) => unimplemented!(),
|
||||
DrawOptions::Raqote(draw_options) => draw_options.alpha = _val,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue