Search
ShapeTemplate.AddOutlineArc Method
See Also
 



Adds an arc to the shape's outline.

 Syntax

VB6  Copy Code

Public Sub AddOutlineArc( _
    ByVal x1 As Integer, _
    ByVal y1 As Integer, _
    ByVal x2 As Integer, _
    ByVal y2 As Integer, _
    ByVal angle As Integer, _
    ByVal sweep As Integer _
)

C++  Copy Code

public:
void AddOutlineArc (
    short x1,
    short y1,
    short x2,
    short y2,
    short angle,
    short sweep
)

 Parameters

x1
A x-coordinate, defined as percent of shape full width.
y1
A y-coordinate, defined as percent of shape full height.
x2
A x-coordinate, defined as percent of shape full width.
y2
A y-coordinate, defined as percent of shape full height.
angle
The starting angle of the arc, in degrees.
sweep
The angle between arc end points, in degrees.

 Remarks

The arc is a part of the ellipse enclosed in the rectangle defined via (x1,y1)-(x2,y2) coordinates. The arc starts at the angle specified as argument and sweeps in clockwise direction as specified via the sweep argument.

 Example

Here is how the Actor shape is defined in C++.

C++  Copy Code

// Actor
CComObject<ShapeTemplate>::CreateInstance(&shape);
shape->AddRef();
shape->AddOutlineArc(40, 0, 60, 20, 90, 360);
shape->AddOutlineStraight(50, 20);
shape->AddOutlineArc(65, 20, 75, 30, 270, 90);
shape->AddOutlineStraight(75, 30);
shape->AddOutlineStraight(75, 60);
shape->AddOutlineStraight(68, 60);
shape->AddOutlineStraight(68, 30);
shape->AddOutlineStraight(64, 30);
shape->AddOutlineStraight(64, 100);
shape->AddOutlineStraight(52, 100);
shape->AddOutlineStraight(52, 65);
shape->AddOutlineStraight(48, 65);
shape->AddOutlineStraight(48, 100);
shape->AddOutlineStraight(36, 100);
shape->AddOutlineStraight(36, 30);
shape->AddOutlineStraight(32, 30);
shape->AddOutlineStraight(32, 60);
shape->AddOutlineStraight(25, 60);
shape->AddOutlineArc(25, 20, 35, 30, 180, 90);
shape->CompleteDefinition(_T("Actor"));

 See Also