-
Notifications
You must be signed in to change notification settings - Fork 479
Description
Currently, clipRect is defined in the frame's coordinate space, where clipRect.set(0, 0, frameWidth, frameHeight)
will show the entire frame. but what if we honor clipRect in FlxBackdrop
or FlxTiledSprite
, should clipRect tile the clipped frame it, or clip the tiled frame? We almost had a PR to clip post-scaled sprites. I think what we're getting at is there should be two clipRects on sprite, one applied to the frame and another applied when finally drawing to the destination.
Hence frameClipRect and worldClipRect.
To add this we should deprecate clipRect when adding both and, internally, make have a check to use clipRect if it is non-null and frameClipRect is null.
Will likely move this off of 5.4.0 though, as 5.4.0 is big enough
clipRect also lacks decent docs, these could be made more clear by adding docs