mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
parent
f0ea3c6150
commit
251eeb2c2d
53 changed files with 1566 additions and 262 deletions
|
@ -27,6 +27,7 @@ use crate::dom::dommatrix::DOMMatrix;
|
|||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::imagedata::ImageData;
|
||||
use crate::dom::offscreencanvas::OffscreenCanvas;
|
||||
use crate::dom::path2d::Path2D;
|
||||
use crate::dom::textmetrics::TextMetrics;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
|
@ -437,21 +438,41 @@ impl OffscreenCanvasRenderingContext2DMethods<crate::DomTypeHolder>
|
|||
self.context.Fill(fill_rule)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-fill
|
||||
fn Fill_(&self, path: &Path2D, fill_rule: CanvasFillRule) {
|
||||
self.context.Fill_(path, fill_rule)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-stroke
|
||||
fn Stroke(&self) {
|
||||
self.context.Stroke()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-stroke
|
||||
fn Stroke_(&self, path: &Path2D) {
|
||||
self.context.Stroke_(path)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-clip
|
||||
fn Clip(&self, fill_rule: CanvasFillRule) {
|
||||
self.context.Clip(fill_rule)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-clip
|
||||
fn Clip_(&self, path: &Path2D, fill_rule: CanvasFillRule) {
|
||||
self.context.Clip_(path, fill_rule)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-ispointinpath
|
||||
fn IsPointInPath(&self, x: f64, y: f64, fill_rule: CanvasFillRule) -> bool {
|
||||
self.context.IsPointInPath(x, y, fill_rule)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-ispointinpath
|
||||
fn IsPointInPath_(&self, path: &Path2D, x: f64, y: f64, fill_rule: CanvasFillRule) -> bool {
|
||||
self.context.IsPointInPath_(path, x, y, fill_rule)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-scale
|
||||
fn Scale(&self, x: f64, y: f64) {
|
||||
self.context.Scale(x, y)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue