mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
Add an implementation for fill_rect
Again, this is probably incomplete but it'll do for now
This commit is contained in:
parent
0a878da500
commit
c39af71aeb
1 changed files with 15 additions and 3 deletions
|
@ -238,11 +238,23 @@ impl GenericDrawTarget for raqote::DrawTarget {
|
|||
}
|
||||
fn fill_rect(
|
||||
&mut self,
|
||||
_rect: &Rect<f32>,
|
||||
_pattern: Pattern,
|
||||
rect: &Rect<f32>,
|
||||
pattern: Pattern,
|
||||
_draw_options: Option<&DrawOptions>,
|
||||
) {
|
||||
unimplemented!();
|
||||
let mut pb = raqote::PathBuilder::new();
|
||||
pb.rect(
|
||||
rect.origin.x,
|
||||
rect.origin.y,
|
||||
rect.size.width,
|
||||
rect.size.height,
|
||||
);
|
||||
raqote::DrawTarget::fill(
|
||||
self,
|
||||
&pb.finish(),
|
||||
pattern.as_raqote(),
|
||||
&raqote::DrawOptions::new(),
|
||||
);
|
||||
}
|
||||
fn get_format(&self) -> SurfaceFormat {
|
||||
unimplemented!();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue