DrawChord


static void DrawChord(Handle Device,
                      int Left,
                      int Top,
                      int Right,
                      int Bottom,
                      int Radial1X,
                      int Radial1Y,
                      int Radial2X,
                      int Radial2Y)

This function draws a filled elliptic figure.

Parameters

Handle Device

The handle of the device context in which the figure is drawn.

int Left

The x-coordinate of the upper-left corner of the bounding rectangle.

int Top

The y-coordinate of the upper-left corner of the bounding rectangle.

int Right

The x-coordinate of the lower-right corner of the bounding rectangle.

int Bottom

The y-coordinate of the lower-right corner of the bounding rectangle.

int Radial1X

The x-coordinate of endpoint of a line determining the beginning of the arc.

int Radial1Y

The y-coordinate of endpoint of a line determining the beginning of the arc.

int Radial2X

The x-coordinate of endpoint of a line specifying the end of the arc.

int Radial2Y

The y-coordinate of endpoint of a line specifying the end of the arc.

Notes

If the specified starting and ending points are the same, a full ellipse is drawn.

The current position is neither used nor updated by this function.

The diagram below illustrates chord specification.

The chord (the light gray section) drawn above is defined as:

DrawChord(Device,
          100,   // x-coordinate of upper-left
          100,   // y-coordinate of upper-left
          300,   // x-coordinate of lower-right
          200,   // y-coordinate of lower-right
          200,   // x-coordinate of Point determining the starting angle
          250,   // y-coordinate of Point determining the starting angle
          400,   // x-coordinate of Point determining the ending angle
          50);   // y-coordinate of Point determining the ending angle

The point where the line drawn from the centre (200,200) of the inscribed ellipse (dotted red) to the point (200,250) intersects the ellipse is the starting point of the chord.

The point where the line drawn from the centre (dotted red) to the point (400,50) intersects the ellipse is the ending point of the chord.

Details

Name Space IPlusPlus::Graphics
Class Gdi
Assembly IPlusPlus.WinPlus.dll