예제 #1
0
        protected void OnGridSizeChanged(EventArgs args)
        {
            GridSizeChanged?.Invoke(this, args);

            this.cellWidth  = width / colsAmount;
            this.cellHeight = height / rowsAmount;

            bitmap?.Dispose();
            bitmap = new Bitmap(width, height);
            graphics?.Dispose();
            graphics = Graphics.FromImage(bitmap);
        }
예제 #2
0
파일: TileMap.cs 프로젝트: Maseya/MushROMs
 /// <summary>
 /// Raises the <see cref="GridSizeChanged"/> event.
 /// </summary>
 /// <param name="e">
 /// An <see cref="EventArgs"/> that contains the event data.
 /// </param>
 protected virtual void OnGridSizeChanged(EventArgs e)
 {
     GridSizeChanged?.Invoke(this, e);
 }
예제 #3
0
 internal void RaiseGridSizeChanged()
 {
     Frame = new CGRect(0, 0, Width, Height);
     GridSizeChanged?.Invoke(IntrinsicContentSize);
 }