MegaMan.Common.Geometry.RectangleF.Offset C# (CSharp) Method

Offset() public method

public Offset ( PointF pos ) : void
pos PointF
return void
        public void Offset(PointF pos)
        {
            this.Offset(pos.X, pos.Y);
        }

Same methods

RectangleF::Offset ( float x, float y ) : void

Usage Example

Example #1
0
        public MapSquare(IScreenLayer layer, Tile tile, int x, int y, int tilesize)
        {
            this.layer = layer;
            Tile = tile;
            X = x;
            Y = y;
            screenX = x * tilesize;
            screenY = y * tilesize;

            var commonBox = Tile.Sprite.BoundBox;

            blockBox = new RectangleF(commonBox.X, commonBox.Y, commonBox.Width, commonBox.Height);
            blockBox.Offset(-Tile.Sprite.HotSpot.X, -Tile.Sprite.HotSpot.Y);
        }
All Usage Examples Of MegaMan.Common.Geometry.RectangleF::Offset