mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
canvas: Respect FillRule (#38294)
We just need to pass user provided FillRule via IPC to canvas paint thread, then pass it all down to backend, which will handle it. Testing: Added WPT tests. --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
4188852963
commit
bc71fb8c0d
22 changed files with 693 additions and 32 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use canvas_traits::canvas::{
|
||||
CompositionOptions, FillOrStrokeStyle, LineOptions, Path, ShadowOptions,
|
||||
CompositionOptions, FillOrStrokeStyle, FillRule, LineOptions, Path, ShadowOptions,
|
||||
};
|
||||
use compositing_traits::SerializableImageData;
|
||||
use euclid::default::{Point2D, Rect, Size2D, Transform2D};
|
||||
|
@ -47,6 +47,7 @@ pub(crate) trait GenericDrawTarget {
|
|||
fn fill(
|
||||
&mut self,
|
||||
path: &Path,
|
||||
fill_rule: FillRule,
|
||||
style: FillOrStrokeStyle,
|
||||
composition_options: CompositionOptions,
|
||||
transform: Transform2D<f32>,
|
||||
|
@ -68,7 +69,7 @@ pub(crate) trait GenericDrawTarget {
|
|||
);
|
||||
fn get_size(&self) -> Size2D<i32>;
|
||||
fn pop_clip(&mut self);
|
||||
fn push_clip(&mut self, path: &Path, transform: Transform2D<f32>);
|
||||
fn push_clip(&mut self, path: &Path, fill_rule: FillRule, transform: Transform2D<f32>);
|
||||
fn push_clip_rect(&mut self, rect: &Rect<i32>);
|
||||
fn stroke(
|
||||
&mut self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue