mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
auto merge of #4891 : mmatyas/servo/canvas_gradient, r=jdm
Based on [ebalint](https://github.com/ebalint)'s original patch, this commit implements the linear and radial gradients for the canvas. The PR also includes test cases. Depends on #4623 and servo/rust-azure#136.
This commit is contained in:
commit
dea36f9816
55 changed files with 290 additions and 228 deletions
|
@ -6,7 +6,7 @@
|
|||
interface CanvasGradient {
|
||||
// opaque object
|
||||
// addColorStop should take a double
|
||||
//void addColorStop(float offset, DOMString color);
|
||||
void addColorStop(float offset, DOMString color);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -52,8 +52,10 @@ interface CanvasRenderingContext2D {
|
|||
// colours and styles (see also the CanvasDrawingStyles interface)
|
||||
attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black)
|
||||
attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
|
||||
//CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
|
||||
//CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
|
||||
[Throws]
|
||||
CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
|
||||
[Throws]
|
||||
CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
|
||||
//CanvasPattern createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition);
|
||||
|
||||
// shadows
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue