Merge pull request #415 from larsiusprime/origin_master
ColorBounds Rect flash compile fix
This commit is contained in:
@@ -460,12 +460,18 @@ class Image {
|
||||
|
||||
}
|
||||
|
||||
public function getColorBoundsRect(mask:Int, color:Int, findColor:Bool = true, format:PixelFormat = null):Rectangle {
|
||||
public function getColorBoundsRect(mask:Int, color:Int, findColor:Bool = true, format:PixelFormat = null):#if (flash) flash.geom.Rectangle #else Rectangle #end {
|
||||
|
||||
if (buffer == null) return null;
|
||||
|
||||
//TODO: add all the other cases
|
||||
|
||||
#if flash
|
||||
|
||||
return buffer.__srcBitmapData.getColorBoundsRect(mask, color, findColor);
|
||||
|
||||
#else
|
||||
|
||||
switch (type) {
|
||||
|
||||
case CANVAS:
|
||||
@@ -476,14 +482,12 @@ class Image {
|
||||
|
||||
return ImageDataUtil.getColorBoundsRect(this, mask, color, findColor, format);
|
||||
|
||||
case FLASH:
|
||||
|
||||
return buffer.__srcBitmapData.getColorBoundsRect(mask, color, findColor);
|
||||
|
||||
default:
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
#end
|
||||
}
|
||||
|
||||
public function getPixel (x:Int, y:Int, format:PixelFormat = null):Int {
|
||||
|
||||
Reference in New Issue
Block a user