You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
drawImage: negative width/height does not flip the image (mdn#40695)
* Remove incorrect information from drawImage docs (mdn#37873).
Negative sWidth and sHeight do not actually flip the resulting image, removed the lines that claimed they do.
See mdn#37873.
* Update drawImage information based on feedback from review.
* Update index.md
* Update index.md
---------
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
destination context. If not specified, the entire rectangle from the coordinates
47
47
specified by `sx` and `sy` to the bottom-right corner of the
48
48
image is used. Use the 3- or 5-argument syntax to omit this argument.
49
-
A negative value will flip the image.
49
+
Negative values grow the sub-rectangle in the opposite direction, but pixels are always processed in the original direction and the image is not flipped.
50
50
-`sHeight` {{optional_inline}}
51
51
- : The height of the sub-rectangle of the source `image` to draw into the
52
52
destination context. Use the 3- or 5-argument syntax to omit this argument.
53
-
A negative value will flip the image.
53
+
Negative values grow the sub-rectangle in the opposite direction, but pixels are always processed in the original direction and the image is not flipped.
54
54
-`dx`
55
55
- : The x-axis coordinate in the destination canvas at which to place the top-left
- : The width to draw the `image` in the destination canvas. This allows
62
62
scaling of the drawn image. If not specified, the image is not scaled in width when
63
63
drawn. Note that this argument is not included in the 3-argument syntax.
64
+
Negative values grow the sub-rectangle in the opposite direction, but pixels are always processed in the original direction and the image is not flipped.
64
65
-`dHeight`
65
66
- : The height to draw the `image` in the destination canvas. This allows
66
67
scaling of the drawn image. If not specified, the image is not scaled in height when
67
68
drawn. Note that this argument is not included in the 3-argument syntax.
69
+
Negative values grow the sub-rectangle in the opposite direction, but pixels are always processed in the original direction and the image is not flipped.
0 commit comments