I'm not sure I got clearly what you are after, So I'll assume you want the default values for the arguments of drawImage(source, sx, sy, sw, sh, dx, dy, dw, dh)
when you use the short version drawImage(source, dx, dy)
or the less short drawImage(source, dx, dy, dw, dh)
.
In case of an <img>
element as source, it is drawImage(img, 0,0, img.naturalWidth, img.naturalHeight, 0, 0, img.naturalWidth, img.naturalHeight)
.
In case of a <video>
element as source, it is drawImage(vid, 0,0, vid.videoWidth, vid.videoHeight, dx, dy, vid.videoWidth, vid.videoHeight)
.
For any other source type it is drawImage(source, 0, 0, source.width, source.height, 0, 0, dx, dy)
.
So we can make this table :
drawImage(
source: always inputed,
sx: input || 0,
sy: input || 0,
sw: input || source.[natural | video]width,
sh: input || source.[natural | video]height,
dx: always inputed,
dy: always inputed,
dw: input || sw,
dh: input || sh
)