How to add ink to my program

How does microsoft ink work and how can I add it to my c++ program? I've been looking around on the internet and I can't find any tutorials. I managed to find two sample programs from microsoft but they are beyond my understanding. Is there a simple way to add pen support to my program? I don't need anything fancy, just drawing and erasing capabilities.
You use pen and brush objects to render graphics, text, and images with GDI+. A pen is an instance of the Pen class, and is used to draw lines and outlined shapes. A brush is an instance of any class that derives from the MustInherit (abstract) Brush class, and can be used to fill shapes or paint text. Color objects are instances of classes that represent a particular color, and can be used by pens and brushes to indicate the color of rendered graphics. The following examples demonstrate the use of these objects.

// Creates a pen that draws in red.
Pen* myPen = new Pen(Color::Red);
// Creates a brush that fills in solid blue.
SolidBrush* myBrush = new SolidBrush(Color::Blue);

A pen is used to draw lines, curves, and to outline shapes. The following example shows how to create a basic black pen

// This line creates a black pen with a default thickness of 1.
Pen* myPen1 = new Pen(Color::Black);
// This line creates a black pen with a thickness of 5.
Pen* myPen2 = new Pen(Color::Black, 5);

You can also create a pen from an already existing brush object. The following demonstrates how to create a pen that is based on an already existing brush called myBrush.

// Creates a pen with the same display properties as myBrush and a default
// thickness of 1.
SolidBrush* myBrush = new SolidBrush(Color::Red);
Pen* myPen1 = new Pen(myBrush);
// Creates a pen with the same display properties as myBrush and a
// thickness of 5.
Pen* myPen2 = new Pen(myBrush, 5);

Once you have created a pen, you can then use it to draw a line, arc, or outlined shape. The following example demonstrates how to use a pen to draw an ellipse:

Pen* myPen = new Pen(Color::Black);
Graphics* g = this->CreateGraphics();
g->DrawEllipse(myPen, 20, 30, 10, 50);

Once your pen exists, you can change various properties that affect the way it presents lines. Properties such as Width and Color affect the appearance of the line, and the StartCap and EndCap properties allow you to add preset or custom shapes to the beginning or end of your lines

http://www.traininginsholinganallur.in/java-training-in-chennai.html#

http://www.traininginsholinganallur.in/android-training-in-chennai.html#

http://www.traininginsholinganallur.in/software-testing-training-in-chennai.html#
Topic archived. No new replies allowed.