MultiEditor.MultiEditorComponentList.RecalcMinMax C# (CSharp) Method

RecalcMinMax() private method

Recalcs Bitmap size
private RecalcMinMax ( ) : void
return void
        private void RecalcMinMax()
        {
            //CalcEdgeTiles
            yMin = -44; // 0,0
            yMax = (Width + Height) * 22; // width,height
            xMin = -Height * 22 - 22; // 0,height
            xMax = Width * 22 + 22; // width,0
            zMin = 127;
            zMax = -128;
            foreach (MultiTile tile in Tiles)
            {
                if (tile.isVirtualFloor)
                    continue;
                if (tile.GetBitmap() == null)
                    continue;
                int px = tile.Xmod - GapXMod;
                int py = tile.Ymod - GapYMod;

                if (px < xMin)
                    xMin = px;
                if (py < yMin)
                    yMin = py;
                px += tile.GetBitmap().Width;
                py += tile.GetBitmap().Height;

                if (px > xMax)
                    xMax = px;
                if (py > yMax)
                    yMax = py;
                if (tile.Z > zMax)
                    zMax = tile.Z;
                if (tile.Z < zMin)
                    zMin = tile.Z;
            }

            Modified = false;
            xMinOrg = xMin;
            xMaxOrg = xMax;
            yMinOrg = yMin;
            yMaxOrg = yMax;

            if (Parent.ShowWalkables)
                CalcWalkable();
            if (Parent.ShowDoubleSurface)
                CalcDoubleSurface();
        }

Same methods

MultiEditorComponentList::RecalcMinMax ( MultiTile tile ) : void