ObjectDCL Banner

PictureBox_DrawLine Method

Description

This method draws a list of lines in the control.

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.
StartX
Integer specifying the start point X-axis coordinate.
StartY
Integer specifying the start point Y-axis coordinate.
EndX
Integer specifying the end point X-axis coordinate.
EndY
Integer specifying the end point Y-axis coordinate.
Color
Color specifying the line 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_DrawLine 
		MyControlReference [as Reference]
		(list 
			(list 
				StartX [as Integer]
				StartY [as Integer]
				EndX [as Integer]
				EndY [as Integer]
				Color [as Color]) 
			(list 
				StartX [as Integer]
				StartY [as Integer]
				EndX [as Integer]
				EndY [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_DrawLine
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		(list 
			(list 
				StartX [as Integer]
				StartY [as Integer]
				EndX [as Integer]
				EndY [as Integer]
				Color [as Color]) 
			(list 
				StartX [as Integer]
				StartY [as Integer]
				EndX [as Integer]
				EndY [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 lines
(Odcl_PictureBox_DrawLine MyProject_MyForm_MyControl
		(list
			(list 0 0 100 100 -11)
			(list 0 100 100 0 -3)
		)
	)

See Also

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