|
@@ -726,11 +726,22 @@ class Object {
|
|
return;
|
|
return;
|
|
|
|
|
|
ctx.globalAlpha = oldAlpha * alpha;
|
|
ctx.globalAlpha = oldAlpha * alpha;
|
|
- emitTile(ctx, finalTile);
|
|
|
|
|
|
+ emitFilterTile(ctx, finalTile);
|
|
ctx.globalAlpha = oldAlpha;
|
|
ctx.globalAlpha = oldAlpha;
|
|
ctx.flush();
|
|
ctx.flush();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function emitFilterTile( ctx, tile ) {
|
|
|
|
+ if( filter.blendMode != null ) {
|
|
|
|
+ if( nullDrawable == null )
|
|
|
|
+ nullDrawable = @:privateAccess new h2d.Drawable(null);
|
|
|
|
+ nullDrawable.blendMode = filter.blendMode;
|
|
|
|
+ }
|
|
|
|
+ emitTile(ctx, tile);
|
|
|
|
+ if( filter.blendMode != null )
|
|
|
|
+ nullDrawable.blendMode = Alpha;
|
|
|
|
+ }
|
|
|
|
+
|
|
function drawRec( ctx : RenderContext ) {
|
|
function drawRec( ctx : RenderContext ) {
|
|
if( !visible ) return;
|
|
if( !visible ) return;
|
|
// fallback in case the object was added during a sync() event and we somehow didn't update it
|
|
// fallback in case the object was added during a sync() event and we somehow didn't update it
|