mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Properly pass draw_options in fill_rect
This commit is contained in:
parent
e90d1a1d8d
commit
fda815bcbb
1 changed files with 8 additions and 2 deletions
|
@ -279,7 +279,7 @@ impl GenericDrawTarget for raqote::DrawTarget {
|
|||
&mut self,
|
||||
rect: &Rect<f32>,
|
||||
pattern: Pattern,
|
||||
_draw_options: Option<&DrawOptions>,
|
||||
draw_options: Option<&DrawOptions>,
|
||||
) {
|
||||
let mut pb = raqote::PathBuilder::new();
|
||||
pb.rect(
|
||||
|
@ -288,11 +288,17 @@ impl GenericDrawTarget for raqote::DrawTarget {
|
|||
rect.size.width,
|
||||
rect.size.height,
|
||||
);
|
||||
let draw_options = if let Some(options) = draw_options {
|
||||
*options.as_raqote()
|
||||
} else {
|
||||
raqote::DrawOptions::new()
|
||||
};
|
||||
|
||||
raqote::DrawTarget::fill(
|
||||
self,
|
||||
&pb.finish(),
|
||||
pattern.as_raqote(),
|
||||
&raqote::DrawOptions::new(),
|
||||
&draw_options,
|
||||
);
|
||||
}
|
||||
fn get_format(&self) -> SurfaceFormat {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue