avm2: Stub BitmapData.hitTest

This commit is contained in:
Nathan Adams 2023-03-07 04:30:09 +01:00 committed by Aaron Hill
parent 1a7022c30b
commit b15463d3fd
2 changed files with 10 additions and 0 deletions

View File

@ -35,6 +35,7 @@ package flash.display {
public native function getColorBoundsRect(mask:uint, color:uint, findColor:Boolean = true):Rectangle;
public native function scroll(x:int, y:int):void;
public native function lock():void;
public native function hitTest(firstPoint:Point, firstAlphaThreshold:uint, secondObject:Object, secondBitmapDataPoint:Point = null, secondAlphaThreshold:uint = 1):Boolean;
public native function unlock(changeRect:Rectangle = null):void;
public native function copyPixels(
sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, alphaBitmapData:BitmapData = null, alphaPoint:Point = null, mergeAlpha:Boolean = false

View File

@ -763,6 +763,15 @@ pub fn unlock<'gc>(
Ok(Value::Undefined)
}
pub fn hit_test<'gc>(
activation: &mut Activation<'_, 'gc>,
_this: Option<Object<'gc>>,
_args: &[Value<'gc>],
) -> Result<Value<'gc>, Error<'gc>> {
avm2_stub_method!(activation, "flash.display.BitmapData", "hitTest");
Ok(false.into())
}
/// Implements `BitmapData.draw`
pub fn draw<'gc>(
activation: &mut Activation<'_, 'gc>,