Draws a circle or an ellipse section in an Image control.

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 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

// Draw a circle section whose // background is light yellow and whose border is light blue IMG_Drawing.DrawSlice(10, 10, 50, 50, 20, 20, 40, 50, LightYellow, LightBlue)

If this parameter is not specified, the line color:

corresponds to the color specified in the last call to <Image>.Pen,

is identical to the Color used for the Background if the <Image>.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).
The coordinates are specified in relation to the top left corner of the Image control (coordinates set to (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>.DrawChord.

Drawing with opacity or anti-aliasing

In the case of a drawing with opacity (function <Image>.StartDrawing with the constant dWithOpacity) or anti-aliasing (function <Image>.ChangeMode with the constant drawAntiAliasing), the contour is drawn by-Above inside the portion: 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