ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Drawing functions
  • Drawing a circle in an Image control
Drawing a circle in an Image control
The following code is used to draw a circle in an Image control (IMG_ImageDrawing). The coordinates of the rectangle into which the circle will be drawn are entered by the user in edit controls (EDT_X1, EDT_Y1, EDT_X2, EDT_Y2). The background color and the line color of the circle are selected by the user via two radio buttons (RADIO_SelectBackground and RADIO_SelectLine).
// Déclaration des variables
CouleurFond is int
CouleurTrait is int

// Déclaration du dessin dans le champ Image "IMG_ImageDessin"
dStartDrawing(IMG_ImageDessin)

// Récupération de la couleur de fond sélectionnée
SWITCH SEL_SelectFond
	CASE 1 : CouleurFond = LightRed
	CASE 2 : CouleurFond = LightBlue
	CASE 3 : CouleurFond = LightGreen
	CASE 4 : CouleurFond = LightYellow
END

// Récupération de la couleur du trait sélectionnée
SWITCH SEL_SelectTrait
	CASE 1 : CouleurTrait = LightRed
	CASE 2 : CouleurTrait = LightBlue
	CASE 3 : CouleurTrait = LightGreen
	CASE 4 : CouleurTrait = LightYellow
END

// Tracé du cercle
dCircle(SAI_X1, SAI_Y1, SAI_X2, SAI_Y2, CouleurFond, CouleurTrait)
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help