OurSonic.Level.Objects.LevelObjectAssetFrame.DrawSimple C# (CSharp) Method

DrawSimple() public method

public DrawSimple ( CanvasRenderingContext2D mainCanvas, Point pos, int width, int height, bool xflip, bool yflip ) : void
mainCanvas System.Html.Media.Graphics.CanvasRenderingContext2D
pos Point
width int
height int
xflip bool
yflip bool
return void
        public void DrawSimple(CanvasRenderingContext2D mainCanvas, Point pos, int width, int height, bool xflip, bool yflip)
        {
            var c = GetCache(false, false, false);

            mainCanvas.Save();
            mainCanvas.Translate(pos.X, pos.Y);
            mainCanvas.Scale(((double)width / Width), ((double)height / Height));

            mainCanvas.DrawImage(c.Canvas, 0, 0);
            mainCanvas.Restore();
        }