CGRectApplyAffineTransform() public static méthode

public static CGRectApplyAffineTransform ( Rect rect, CGAffineTransform transform ) : Rect
rect UnityEngine.Rect
transform CGAffineTransform
Résultat UnityEngine.Rect
        public Rect getBounds()
        {
            Rect rect = new Rect();

            for (var ent = _tiles.head; ent != null; ent = ent.next)
            {
                Vector2 sptSize = ent.obj.spriteFrame.originalSize / UIWindow.PIXEL_PER_UNIT;
                Rect    sptRect = new Rect(-sptSize / 2, sptSize);
                sptRect = CGAffineTransform.CGRectApplyAffineTransform(sptRect, ent.obj.transform);
                rect    = ccUtils.RectUnion(rect, sptRect);
            }
            rect.position *= UIWindow.PIXEL_PER_UNIT;
            rect.size     *= UIWindow.PIXEL_PER_UNIT;
            return(rect);
        }
        public Tile getTile(Vector2 positionInNodeSpace)
        {
            Vector2 uPositionInNodeSpace = positionInNodeSpace / UIWindow.PIXEL_PER_UNIT;

            for (var ent = _tiles.head; ent != null; ent = ent.next)
            {
                Vector2 sptSize = ent.obj.spriteFrame.originalSize / UIWindow.PIXEL_PER_UNIT;
                Rect    sptRect = new Rect(-sptSize / 2, sptSize);
                sptRect = CGAffineTransform.CGRectApplyAffineTransform(sptRect, ent.obj.transform);
                if (sptRect.Contains(uPositionInNodeSpace))
                {
                    return(ent.obj);
                }
            }
            return(null);
        }
        public void removeTiles(Vector2 positionInNodeSpace)
        {
            Vector2 uPositionInNodeSpace = positionInNodeSpace / UIWindow.PIXEL_PER_UNIT;

            for (var ent = _tiles.head; ent != null; ent = ent.next)
            {
                Vector2 sptSize = ent.obj.spriteFrame.originalSize / UIWindow.PIXEL_PER_UNIT;
                Rect    sptRect = new Rect(-sptSize / 2, sptSize);
                sptRect = CGAffineTransform.CGRectApplyAffineTransform(sptRect, ent.obj.transform);
                if (sptRect.Contains(uPositionInNodeSpace))
                {
                    _tiles.DL_DELETE(ent.obj);
                }
            }
            _meshDirty = true;
        }