ObjectDCL Banner

PictureBox_DrawArc Method

Description

This method draws an arc on the control. This method requires center coordinates, a radius, and start and end points to calculate the start and end angles of the arc. These points don't need to fall directly on the arc, they are used to calculate the start and end angles.

Parameters

MyControlReference
Reference to the control in the form of MyProject_MyForm_MyControl.
ProjectFile
String identifying the project as it was passed in LoadProject.
DialogName
String identifying the dialog by name.
ControlName
String identifying the control by name.
UpperLeftX
Integer specifying the upper left X-axis coordinate.
UpperLeftY
Integer specifying the upper left Y-axis coordinate.
Radius
Integer specifying the radius of the arc.
StartAngleX
Integer specifying the X-axis coordinate of the start angle.
StartAngleY
Integer specifying the Y-axis coordinate of the start angle.
EndAngleX
Integer specifying the X-axis coordinate of the end angle.
EndAngleY
Integer specifying the Y-axis coordinate of the end angle.
Color
Color specifying the rectangle color.

Return Values

Returns the following according to the situation:

  • T when successful.
  • Nil if the control is not found or is not visible.

AutoLISP Syntax

The recommended convention is passing the control identifier directly:

CopyCode imageCopy Code
(Odcl_PictureBox_DrawArc 
		MyControlReference [as Reference]
		(list 
			(list 
				UpperLeftX [as Integer]
				UpperLeftY [as Integer]
				Radius [as Integer]
				StartAngleX [as Integer]
				StartAngleY [as Integer]
				EndAngleX [as Integer]
				EndAngleY [as Integer]
				Color [as Color]) 
			(list 
				UpperLeftX [as Integer]
				UpperLeftY [as Integer]
				Radius [as Integer]
				StartAngleX [as Integer]
				StartAngleY [as Integer]
				EndAngleX [as Integer]
				EndAngleY [as Integer]
				Color [as Color]) 
			...
		)
	)

An alternative convention is to identify the control by providing the project file, the dialog name and the control name:

CopyCode imageCopy Code
(Odcl_PictureBox_DrawArc
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		(list 
			(list 
				UpperLeftX [as Integer]
				UpperLeftY [as Integer]
				Radius [as Integer]
				StartAngleX [as Integer]
				StartAngleY [as Integer]
				EndAngleX [as Integer]
				EndAngleY [as Integer]
				Color [as Color]) 
			(list 
				UpperLeftX [as Integer]
				UpperLeftY [as Integer]
				Radius [as Integer]
				StartAngleX [as Integer]
				StartAngleY [as Integer]
				EndAngleX [as Integer]
				EndAngleY [as Integer]
				Color [as Color]) 
			...
		)
	)

Remarks

This function requires that the component is showing. Otherwise it has no effect.

Please create lists as follows using the list keyword:

(list (list x y ...) (list x y ...) ...)
		

It seems that ObjectARX does not always handle lists created as follows:

'(x y ...) (x y ...) ...  
		

Applies For

PictureBox.

Example

CopyCode imageCopy Code
; Draw arcs
(Odcl_PictureBox_DrawArc MyProject_MyForm_MyControl
		(list
			(list 0 0 50 25 0 25 50 -14)
			(list 50 50 25 75 50 75 100 -3)
		)
	)

See Also

PictureBox_DrawCircle, PictureBox_DrawEdge, PictureBox_DrawFillRect, PictureBox_DrawFocusRect, PictureBox_DrawHatchRect, PictureBox_DrawLine, PictureBox_DrawPoint, PictureBox_DrawRect, PictureBox_DrawText, PictureBox_DrawWrappedText