コード例 #1
0
ファイル: Node.cs プロジェクト: liwq-net/liwq718
        /// <summary>
        /// returns a "local" axis aligned bounding box of the node in pixels.
        /// The returned box is relative only to its parent.
        /// The returned box is in Points.
        /// @since v0.99.5
        /// </summary>
        public CCRect boundingBoxInPixels()
        {
            CCRect rect = new CCRect(0, 0, this._contentSizeInPixels.Width, this._contentSizeInPixels.Height);

            return(CCAffineTransform.CCRectApplyAffineTransform(rect, nodeToParentTransform()));
        }
コード例 #2
0
ファイル: CCNode.cs プロジェクト: chengcong/cocos2d-xna
        public CCRect boundingBoxInPixels()
        {
            CCRect rect = new CCRect(0f, 0f, this.m_tContentSizeInPixels.width, this.m_tContentSizeInPixels.height);

            return(CCAffineTransform.CCRectApplyAffineTransform(rect, this.nodeToParentTransform()));
        }