diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-D38C47AD-ED05-5693-A734-498788B9B85B.dita --- a/Symbian3/PDK/Source/GUID-D38C47AD-ED05-5693-A734-498788B9B85B.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-D38C47AD-ED05-5693-A734-498788B9B85B.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,35 +1,35 @@ - - - - - -Using Relative and Sequential Drawing

This topic provides examples that demonstrate how to draw a triangle first using relative drawing with a thin solid line, then using relative drawing and a wide line (illustrating curved corners) and finally using sequential drawing between points, with a dot dash line, illustrating line pattern continuation.

Note that there is a third way to draw a triangle, using DrawPolygon(). This must be to used to draw a filled triangle.

Drawing a triangle using relative drawing (thin lines)

You can draw a triangle of thin lines, using relative drawing, MoveTo() and DrawLineBy().

... -// draw a triangle by relative drawing -gc.MoveTo(TPoint(300,50)); // drawing position (300,50) -gc.DrawLineBy(TPoint(205,100)); // drawing position (505,150) -gc.DrawLineBy(TPoint(-410,0)); // drawing position (95,150) -gc.DrawLineBy(TPoint(205,-100)); // drawing position (300,50) -...

Note: The sum of the three TPoint vectors used by the DrawLineBy() calls comes to (0,0), thus creating a closed shape.

Drawing a triangle using relative drawing (thick lines)

You can draw a triangle of thick lines, using relative drawing, MoveTo() and DrawLineBy().

... -// draw a triangle, by relative drawing -// illustrating rounded ends at corners when using very wide lines -gc.SetPenWidth(penSizeFat); -gc.MoveTo(TPoint(300,50)); // drawing position (300,50) -gc.DrawLineBy(TPoint(205,100)); // drawing position (505,150) -gc.DrawLineBy(TPoint(-410,0)); // drawing position (95,150) -gc.DrawLineBy(TPoint(205,-100)); // drawing position (300,50) -...
Drawing a triangle using sequential drawing between points

This topic provides an example that demonstrates how to draw a triangle of dot dash lines, using sequential drawing between points, DrawLineTo().

... -// draw a triangle by sequential drawing between specified points, -// using dot-dash line style, illustrating line pattern continuation -gc.SetPenStyle(CGraphicsContext::EDotDashPen); -gc.MoveTo(TPoint(300,50)); // drawing position (300,50) -gc.DrawLineTo(TPoint(505,150)); // drawing position (505,150) -gc.DrawLineTo(TPoint(95,150)); // drawing position (95,150) -gc.DrawLineTo(TPoint(300,50)); // drawing position (300,50) -...

Note: The final point drawn to is the same as the point originally moved to, thus creating a closed shape.

Drawing + + + + + +Using Relative and Sequential Drawing

This topic provides examples that demonstrate how to draw a triangle first using relative drawing with a thin solid line, then using relative drawing and a wide line (illustrating curved corners) and finally using sequential drawing between points, with a dot dash line, illustrating line pattern continuation.

Note that there is a third way to draw a triangle, using DrawPolygon(). This must be to used to draw a filled triangle.

Drawing a triangle using relative drawing (thin lines)

You can draw a triangle of thin lines, using relative drawing, MoveTo() and DrawLineBy().

... +// draw a triangle by relative drawing +gc.MoveTo(TPoint(300,50)); // drawing position (300,50) +gc.DrawLineBy(TPoint(205,100)); // drawing position (505,150) +gc.DrawLineBy(TPoint(-410,0)); // drawing position (95,150) +gc.DrawLineBy(TPoint(205,-100)); // drawing position (300,50) +...

Note: The sum of the three TPoint vectors used by the DrawLineBy() calls comes to (0,0), thus creating a closed shape.

Drawing a triangle using relative drawing (thick lines)

You can draw a triangle of thick lines, using relative drawing, MoveTo() and DrawLineBy().

... +// draw a triangle, by relative drawing +// illustrating rounded ends at corners when using very wide lines +gc.SetPenWidth(penSizeFat); +gc.MoveTo(TPoint(300,50)); // drawing position (300,50) +gc.DrawLineBy(TPoint(205,100)); // drawing position (505,150) +gc.DrawLineBy(TPoint(-410,0)); // drawing position (95,150) +gc.DrawLineBy(TPoint(205,-100)); // drawing position (300,50) +...
Drawing a triangle using sequential drawing between points

This topic provides an example that demonstrates how to draw a triangle of dot dash lines, using sequential drawing between points, DrawLineTo().

... +// draw a triangle by sequential drawing between specified points, +// using dot-dash line style, illustrating line pattern continuation +gc.SetPenStyle(CGraphicsContext::EDotDashPen); +gc.MoveTo(TPoint(300,50)); // drawing position (300,50) +gc.DrawLineTo(TPoint(505,150)); // drawing position (505,150) +gc.DrawLineTo(TPoint(95,150)); // drawing position (95,150) +gc.DrawLineTo(TPoint(300,50)); // drawing position (300,50) +...

Note: The final point drawn to is the same as the point originally moved to, thus creating a closed shape.

Drawing to a Graphics Context Tutorials Drawing and Graphics Contexts
\ No newline at end of file