PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Drawing the arc of a circle in an Image control
Drawing the arc of a circle in an Image control
The following code shows how to draw an arc in an Image control (IMG_ImageDrawing). Several edit controls (named EDT_X1, EDT_Y1, EDT_X2, EDT_Y2, EDT_X3, EDT_Y3, EDT_X4, EDT_Y4) allow the user to enter:
  • the coordinates of the rectangle in which the circle will be drawn,
  • the coordinates of the start point and end point of the arc.
The user can select the color of the arc via a Radio Button control (RADIO_SelectColor)
// Declare the variable
ArcColor is int
 
// Declare the drawing in the "IMG_ImageDrawing" control
dStartDrawing(IMG_ImageDrawing)
 
// Retrieve the selected color
SWITCH RADIO_SelectColor
CASE 1: ArcColor = LightRed
CASE 2: ArcColor = LightBlue
CASE 3: ArcColor = LightGreen
CASE 4: ArcColor = LightYellow
END
 
// Arc of the circle
dArc(EDT_X1, EDT_Y1, EDT_X2, EDT_Y2, EDT_X3, EDT_Y3, EDT_X4, EDT_Y4, ArcColor)
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment