PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Drawing the arc of circle in an Image control
Drawing the arc of circle in an Image control
The following code is used 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 of circle.
The color given to the arc of circle is selected by the user 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
 
// Draw the arc of 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