Draws a portion of a circle or ellipse in an Variable type Image.

Versions 25 and later

This function is now available for Android applications.

This function is now available for Java applications.

New in version 25

This function is now available for Android applications.

This function is now available for Java applications.

This function is now available for Android applications.

This function is now available for Java applications.

Versions 15 and later

This function is now available for WEBDEV sites in Linux.

Caution: A specific configuration is required to use this function in Linux. For more details, see The drawings.

New in version 15

This function is now available for WEBDEV sites in Linux.

Caution: A specific configuration is required to use this function in Linux. For more details, see The drawings.

This function is now available for WEBDEV sites in Linux.

Caution: A specific configuration is required to use this function in Linux. For more details, see The drawings.

Versions 16 and later

This function is now available for Android applications.

New in version 16

This function is now available for Android applications.

This function is now available for Android applications.

Versions 17 and later

This function is now available for iPhone/iPad applications.

New in version 17

This function is now available for iPhone/iPad applications.

This function is now available for iPhone/iPad applications.

Versions 18 and later

This function is now available in Windows Store apps mode.

New in version 18

This function is now available in Windows Store apps mode.

This function is now available in Windows Store apps mode.

Versions 21 and later

This function is now available in Universal Windows 10 App mode.

New in version 21

This function is now available in Universal Windows 10 App mode.

This function is now available in Universal Windows 10 App mode.

Example

MonImage est une Image = "Test.gif" // Dessin d'une portion de cercle dont le // fond est jaune clair et le bord bleu clair MonImage.DessinePortion(10, 10, 50, 50, 20, 20, 40, 50, JauneClair, BleuClair) IMG_MonDessin = MonImage

is identical to the Color used for the Background if the <Image variable>.Pen function has not been used..

Remarks

Coordinates

If the start point and the end point are not located on the border of the circle (or on the border of the ellipse), the point taken into account corresponds to the intersection between the circle and the line that joins the specified point and the center of the rectangle (which means the center of the circle).
Coordinates are given with respect to the top left corner of the image (coordinates: (0.0)).

The drawing sections are drawn anticlockwise.

Non-solid figure

To draw a non-solid figure (without taking into account the center of the circle), use <Image variable>.DrawChord.

Drawing with opacity or anti-aliasing

When drawing with opacity (<Image variable>.StartDrawing with the dWithOpacity constant) or with anti-aliasing (<Image variable>.ChangeMode with the drawAntiAliasing constant), the border is drawn above the inside of the section: therefore, the line is partly combined with the inside of the section. If the line is very thick, it will be displayed in two colors.

Related Examples:

Unit examples (WINDEV): The drawing functions

[ + ] Using the main drawing functions of WINDEV to: - Initialize an Image control for drawing - Draw simple shapes - Write a text into a drawing - Change the color in a drawing