Simplify logic in createCanvas().
I assume we used `untyped __js__` to get around incomplete externs, but Haxe 3.2 updated the externs, and they've included the second argument ever since.
This commit is contained in:
@@ -189,13 +189,10 @@ class ImageCanvasUtil
|
||||
|
||||
if (!image.transparent)
|
||||
{
|
||||
if (!image.transparent) buffer.__srcCanvas.setAttribute("moz-opaque", "true");
|
||||
buffer.__srcContext = untyped #if haxe4 js.Syntax.code #else __js__ #end ('buffer.__srcCanvas.getContext ("2d", { alpha: false })');
|
||||
}
|
||||
else
|
||||
{
|
||||
buffer.__srcContext = buffer.__srcCanvas.getContext("2d");
|
||||
buffer.__srcCanvas.setAttribute("moz-opaque", "true");
|
||||
}
|
||||
|
||||
buffer.__srcContext = buffer.__srcCanvas.getContext("2d", {alpha: image.transparent});
|
||||
}
|
||||
#end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user