Exemplo n.º 1
0
        private void blocksScreen_Paint(object sender, PaintEventArgs e)
        {
            if (!fileLoaded)
            {
                return;
            }
            var g = e.Graphics;

            g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
            g.PixelOffsetMode   = System.Drawing.Drawing2D.PixelOffsetMode.Half;

            bool renderPhysics = isPhysicsLayerSelected();

            var renderParams = new MapEditor.RenderParams
            {
                bigBlocks       = bigBlocks,
                visibleRect     = UtilsGui.getVisibleRectangle(pnBlocks, blocksScreen),
                curScale        = curScale,
                showBlocksAxis  = showAxis,
                renderBlockFunc = renderPhysics ? MapEditor.renderPhysicsOnPanelFunc : MapEditor.renderBlocksOnPanelFunc
            };

            int blocksCount = renderPhysics ? ConfigScript.getPhysicsBlocksCount() : bigBlocks.Length; //hardcode physics blocks count

            MapEditor.renderAllBlocks(g, blocksScreen, curActiveBlock, blocksCount, renderParams);
        }
Exemplo n.º 2
0
 private void blocksScreen_Paint(object sender, PaintEventArgs e)
 {
     MapEditor.renderAllBlocks(e.Graphics, blocksScreen, curActiveBlock, smallBlocksImages[0].Length, new MapEditor.RenderParams
     {
         bigBlocks       = smallBlocksImages[0],
         visibleRect     = UtilsGui.getVisibleRectangle(pnBlocks, blocksScreen),
         curScale        = 1.0f,
         showBlocksAxis  = false,
         renderBlockFunc = MapEditor.renderBlocksOnPanelFunc
     });
 }
Exemplo n.º 3
0
 private void blocksScreen_Paint(object sender, PaintEventArgs e)
 {
     MapEditor.renderAllBlocks(e.Graphics, blocksScreen, curActiveBlock, bigBlocks.Length, new MapEditor.RenderParams
     {
         bigBlocks       = bigBlocks,
         visibleRect     = UtilsGui.getVisibleRectangle(pnBlocks, blocksScreen),
         curScale        = curScale,
         showBlocksAxis  = formMain.showAxis,
         renderBlockFunc = MapEditor.renderBlocksOnPanelFunc
     });
 }
Exemplo n.º 4
0
        private void blocksScreen_Paint(object sender, PaintEventArgs e)
        {
            var g = e.Graphics;

            g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
            g.PixelOffsetMode   = System.Drawing.Drawing2D.PixelOffsetMode.Half;
            MapEditor.renderAllBlocks(e.Graphics, blocksScreen, curActiveBlock, videos[curActiveSubpal].Length, new MapEditor.RenderParams
            {
                bigBlocks       = videos[curActiveSubpal],
                visibleRect     = UtilsGui.getVisibleRectangle(this, blocksScreen),
                curScale        = 1.0f,
                showBlocksAxis  = showAxis,
                renderBlockFunc = MapEditor.renderBlocksOnPanelFunc
            });
        }