YOU CAN CODE!

 

With The Case Of UCanCode.net  Release The Power OF  Visual C++ !   HomeProducts | PurchaseSupport | Downloads  
Download Evaluation
Pricing & Purchase?
E-XD++Visual C++/ MFC Products
Overview
Features Tour 
Electronic Form Solution
Visualization & HMI Solution
Power system HMI Solution
CAD Drawing and Printing Solution

Bar code labeling Solution
Workflow Solution

Coal industry HMI Solution
Instrumentation Gauge Solution

Report Printing Solution
Graphical modeling Solution
GIS mapping solution

Visio graphics solution
Industrial control SCADA &HMI Solution
BPM business process Solution

Industrial monitoring Solution
Flowchart and diagramming Solution
Organization Diagram Solution

Graphic editor Source Code
UML drawing editor Source Code
Map Diagramming Solution

Architectural Graphic Drawing Solution
Request Evaluation
Purchase
ActiveX COM Products
Overview
Download
Purchase
Technical Support
  General Q & A
Discussion Board
Contact Us

Links

Get Ready to Unleash the Power of UCanCode .NET


UCanCode Software focuses on general application software development. We provide complete solution for developers. No matter you want to develop a simple database workflow application, or an large flow/diagram based system, our product will provide a complete solution for you. Our product had been used by hundreds of top companies around the world!

"100% source code provided! Free you from not daring to use components because of unable to master the key technology of components!"


Introduction to GDI+ in .NET
GDI+ Color
and
ARGB with Example

By c#corner

In this article, we’ll see basics of GDI+ and how GDI+ is much better interface than its predecessor GDI.

 

Common Graphics Objects

The graphics objects are the objects, which you use to draw your GDI+ items such as images, lines, rectangles, and path. For example, to fill a rectangle with a color, you need a color object and type of style you want to fill such as solid, texture and so on.

There are four common GDI+ objects, which you'll be using throughout your GDI+ life to fill GDI+ items. The major objects are:

Brush Used to fill enclosed surfaces with patterns, colors, or bitmaps.
Pen Used to draw lines and polygons, including rectangles, arcs, and pies
Font Used to describe the font to be used to render text
Color Used to describe the color used to render a particular object. In GDI+ color can be alpha blended

In GDI+, each of these object is represented by a class (also called type).

The Pen Class

A pen draws a line of specified width and style. You always use Pen constructor to create a pen. The constructor initializes a new instance of the Pen class. You can initialize it with a color or brush.

Initializes a new instance of the Pen class with the specified color.

Public Sub New(Color)

Initializes a new instance of the Pen class with the specified Brush.

Public Sub New(Brush)

Initializes a new instance of the Pen class with the specified Brush and width.

Public Sub New(Brush, Single)

Initializes a new instance of the Pen class with the

Dim pn as Pen = new Pen( Color.Blue )
 or
Dim pn as Pen = new Pen( Color.Blue, 100 )

specified Color and Width.

Public Sub New(Color, Single)

Here is one example:

Some of its most commonly used properties are:

Alignment Gets or sets the alignment for objects drawn with this Pen.
Brush Gets or sets the Brush that determines attributes of this Pen.
Color Gets or sets the color of this Pen.
Width Gets or sets the width of this Pen.

The Color Structure

A Color structure represents an ARGB color. Here are ARGB properties of it:

A Gets the alpha component value for this Color.
B Gets the blue component value for this Color.
G  

GDI+ Font, Brush and Bitmap

GDI+ GraphicsPath and LinearGradientBrush

GDI+ Printing.

GDI+ and DrawArc and DrawPath

GDI+ Color and ARGB with Example

 

 

Copyright ?1998-2009 UCanCode.Net Software , all rights reserved.
Other product and company names herein may be the trademarks of their respective owners.

Please direct your questions or comments to webmaster@ucancode.net