mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +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(
|
fn fill_rect(
|
||||||
&mut self,
|
&mut self,
|
||||||
_rect: &Rect<f32>,
|
rect: &Rect<f32>,
|
||||||
_pattern: Pattern,
|
pattern: Pattern,
|
||||||
_draw_options: Option<&DrawOptions>,
|
_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 {
|
fn get_format(&self) -> SurfaceFormat {
|
||||||
unimplemented!();
|
unimplemented!();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue