Sunday, March 1, 2009

GUI


GDI is the abbreviation to Graphical User Interface. GDI is a way to work with painting graphic objects such as painting on windows, forms or other media. To write GUI application, you need to write some kind of visual interface in the form of windows and controls.

GDI+ is a higher level interface of GDI. GDI+ is an easy to use version of GDI. In GDI you need to identify the drivers and the devices to work with but in GDI+ you need not know anything about the devices used for display and printing of data.

GDI+ takes care of everything. Hence GDI+ is more sophisticated and flexible at the same time. This higher level API allows you to set some properties of the controls to get the task done, like changing the colors and fonts of a control.

Improved colors, anti aliasing support, gradient brushes, transformation, alpha blending are some of the features that have been added in GDI+. .Net provides some namespaces to work with GDI+. The namespaces like System.Drawing, System.Drawing.Design, System.Drawing.Printing, System.Drawing.Imaging, System.Drawing.Drawing2D and System.Drawing.Text are used for working with GDI+.

The necessary basic classes of GDI+ are provided in the System.Drawing namespace. Some of the classes of System.Drawing namespace are Bitmap, Image, Brush, Brushes, Font, FontFamily, Graphics, Pen, SolidBrush, and TextureBrush. The structures found in the System.Drawing namespace are Color, Point, PointF, Rectangle, RectangleF, Size, and SizeF.

No comments: