mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Match the azure backend regarding cap stuff
I think this is wrong because it won't respect cap style at all when stroking lines but we'll cross that bridge when we get to it
This commit is contained in:
parent
1dee418ff1
commit
a9fd26729b
1 changed files with 7 additions and 1 deletions
|
@ -349,11 +349,17 @@ impl GenericDrawTarget for raqote::DrawTarget {
|
||||||
let mut pb = raqote::PathBuilder::new();
|
let mut pb = raqote::PathBuilder::new();
|
||||||
pb.move_to(start.x, start.y);
|
pb.move_to(start.x, start.y);
|
||||||
pb.line_to(end.x, end.y);
|
pb.line_to(end.x, end.y);
|
||||||
|
let mut stroke_options = stroke_options.as_raqote().clone();
|
||||||
|
let cap = match stroke_options.join {
|
||||||
|
raqote::LineJoin::Round => raqote::LineCap::Round,
|
||||||
|
_ => raqote::LineCap::Butt,
|
||||||
|
};
|
||||||
|
stroke_options.cap = cap;
|
||||||
|
|
||||||
self.stroke(
|
self.stroke(
|
||||||
&pb.finish(),
|
&pb.finish(),
|
||||||
pattern.as_raqote(),
|
pattern.as_raqote(),
|
||||||
stroke_options.as_raqote(),
|
&stroke_options,
|
||||||
draw_options.as_raqote());
|
draw_options.as_raqote());
|
||||||
}
|
}
|
||||||
fn stroke_rect(
|
fn stroke_rect(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue