MissionPlanner.OSDVideo.gethud C# (CSharp) Method

gethud() public method

public gethud ( Bitmap bmpin, double time ) : Bitmap
bmpin Bitmap
time double
return Bitmap
        public Bitmap gethud(Bitmap bmpin, double time)
        {
            // stop it from drawing
            hud1.HoldInvalidation = true;
            // update bg to be trans
            hud1.bgimage = trans;
            // use gdi
            hud1.opengl = false;
            // resize
            hud1.Width = bmpin.Width;
            hud1.Height = bmpin.Height;
            // makesure we can grab an image
            hud1.streamjpgenable = true;
            // redraw
            hud1.Refresh();
            // clone current screen with trans
            return (Bitmap) hud1.objBitmap.Clone();
        }