
TechEd Barcelona. 2007



Good to work here, specially after you see several XBox360 at the entrance ;)
Thank you guys!
using System;
using System.Drawing;
namespace GDIDB
{
///
/// Class to implement Double Buffering
/// NT Almond
/// 24 July 2003
///
///
public class DBGraphics
{
private Graphics graphics;
private Bitmap memoryBitmap;
private int width;
private int height;
///
/// Default constructor
///
public DBGraphics()
{
width = 0;
height = 0;
}
///
/// Creates double buffer object
///
/// Window forms Graphics Object
/// width of paint area
/// height of paint area
///
public bool CreateDoubleBuffer( Graphics g, int width, int height )
{
if ( width <= 0 height <= 0 ) return false; if ( width != this.width height != this.height memoryBitmap == null graphics == null ) { if ( memoryBitmap != null ) { memoryBitmap.Dispose(); memoryBitmap = null; } if ( graphics != null ) { graphics.Dispose(); graphics = null; } this.width = width; this.height = height; memoryBitmap = new Bitmap( width, height ); graphics = Graphics.FromImage( memoryBitmap ); } return true; } ///
/// Renders the double buffer to the screen
///
/// Window forms Graphics Object
public void Render( Graphics g )
{
if ( memoryBitmap != null )
g.DrawImage( memoryBitmap, new Rectangle( 0, 0, width, height ), 0, 0, width, height, GraphicsUnit.Pixel );
}
///
///
///
///
public bool CanDoubleBuffer()
{
return graphics != null;
}
///
/// Accessor for memory graphics object
///
public Graphics g
{
get
{
return graphics;
}
}
}
}
Code found here, among other sites:
http://www.koders.com/csharp/fid8D1742BF7E30AEB520A0548A95C99DD48CDAA645.aspx
Take a look at the newest Simax Project video. It shows a high speed ride with the Porsche 911 Carrera through a highway, closed to traffic.
http://stage6.divx.com/user/graphicdna/video/1351013/Simax-DS--Porsche-911-highway-ride--HD
More info at: www.simax.es