Results 1 to 5 of 5

Thread: What is GDI+ ?

  1. #1
    Join Date
    May 2008
    Posts
    29

    What is GDI+ ?

    GDI + (Graphical Device Interface) is used to draw shapes (lines, rectangles, ellipses ...) or text, but also to manipulate images. It has not the power of DirectX, but it is relatively easy to use if you know a minimum.

    Microsoft Windows GDI+ is a class-based API for C/C++ programmers. It enables applications to use graphics and formatted text on both the video display and the printer. Applications based on the Microsoft Win32 API do not access graphics hardware directly. Instead, GDI+ interacts with device drivers on behalf of applications. GDI+ is also supported by Microsoft Win64.

    Begin by examining some of the tools involved in the use of GDI +:

    - Management of colors (color)
    - Pens (pen)
    - Brushes (brush)
    - Graphical tool

    Difficult to imagine the drawing without color. C # in several ways to specify or modify a color.

  2. #2
    Join Date
    May 2008
    Posts
    29

    Re: What is GDI+ ?

    GDI+ can be used in all Windows-based applications. GDI+ is new technology that is included in Windows XP and the Windows Server 2003. It is required as a redistributable for applications that run on the Microsoft Windows NT 4.0 SP6, Windows 2000, Windows 98, and Windows Millennium Edition (Windows Me) operating systems.

    Run-time Requirements

    Gdiplus.dll is included with Windows XP. For information about which operating systems are required to use a particular class or method, see the More Information section of the documentation for the class or method. GDI+ is available as a redistributable for Windows NT 4.0 SP6, Windows 2000, Windows 98, and Windows Me. To download the latest redistributable.

    GDI+ functions and classes are not supported for use within a Windows service. Attempting to use these functions and classes from a Windows service may produce unexpected problems, such as diminished service performance and run-time exceptions or errors.

  3. #3
    Join Date
    Oct 2008
    Posts
    73

    Re: What is GDI+ ?

    The Color class lets you specify a color either by taking one of its constants, or by creating a color by mixing red, green and blue (RGB or RGB into English).

    To change the background color (BackColor) a blue window Form1 is written in the code of the form:

    this.BackColor = Color.Blue;
    or:

    this.BackColor = Color.FromArgb (0, 0, 255);

  4. #4
    Join Date
    May 2008
    Posts
    181

    Re: What is GDI+ ?

    Pens

    A pen is a graphics tool that an application can use to draw lines and curves. Drawing applications use pens to draw freehand lines, straight lines, and curves. Computer-aided design (CAD) applications use pens to draw visible lines, hidden lines, section lines, center lines, and so on. Word processing and desktop publishing applications use pens to draw borders and rules. Spreadsheet applications use pens to designate trends in graphs and to outline bar graphs and pie charts.

    To draw, of course we need pens (pen). To use them you will have your project included in the spaces of the following names:

    using System.Drawing;
    using System.Drawing.Drawing2D;

    The Pen class has four constructors:

    Pen (Brush): Creates a pen with a brush (Brush) specified with a thickness of one pixel,

    Pen (Color): Creates a pen with the specified color with a thickness of one pixel,

    Pen (Brush, Single): Single which is a float, creating a pen with a brush (Brush) and thickness specified,

    Pen (Color, Single): Single which is a float, creating a pen with the color and thickness specified.

  5. #5
    Join Date
    Oct 2008
    Posts
    54

    Re: What is GDI+ ?

    Brushes (Brush)

    This class is the basis for derived classes 5:

    SolidBrush painting united

    HatchBrush painting with hachures

    TextureBrush painting with a texture

    LinearGradientBrush and PathGradientBrush: painting with color gradient

    SolidBrush and TextureBrush are part of the namespace System.Drawing. HatchBrush, LinearGradientBrush and PathGradientBrush of the namespace System.Drawing.Drawing2D.

    To create a brush yellow united states:
    Brush brush = new SolidBrush (Color.Yellow);

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,887,975.61610 seconds with 15 queries