the whatwg interface CanvasRenderingContext2D now contains a pile of drawImage functions as well as another createPattern function. These needs to be added to nsIDOMCanvasRenderingContext2D and implemented properly so that these functions can be called not only from script. Ideally the drawImage() and createPattern() functions should be moved off to an nsIDOMJSCanvasRenderingContext2D interface too. That's how we've solved similar situations on nsIDOMWindow/nsIDOMJSWindow
Duplicate of bug 293221 or the other way around?
Neither, that bug mostly seems to be about properties that don't work properly. This one is about functions that are missing.
Could be P2 or P4/P5, depends on whether people use it. Vlad?
Priority: -- → P2
is this even a real bug still?
It is, it's a P4 at the moment -- those methods are accessible from script only, because their IDL prototype is just drawImage() and the params are pulled out of xpconnect. They have variable numbers of args, which IDL can't handle...
Priority: P2 → P4
Things have changed a bit, drawImage is not in the same place as other Canvas2D functions and its prototype is no longer drawImage(), it's // image api [optional_argc] void drawImage(in nsIDOMElement image, in float a1, in float a2, [optional] in float a3, [optional] in float a4, [optional] in float a5, [optional] in float a6, [optional] in float a7, [optional] in float a8); /* void drawImage(in HTMLImageElement image, in float dx, in float dy); void drawImage(in HTMLImageElement image, in float dx, in float dy, in float sw, in float sh); void drawImage(in HTMLImageElement image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh); */ However as Vlad mentions in comment 5, we still are blocked on overloading-in-IDL to get this done in the really good way. Fortunately we now have a bug filed for that, bug 691394.
Depends on: 691394
Per my previous comment, this bug is now obsolete.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.