LineSlant Property
Specifies the slope direction of a Line control or rounded corners (Bezier curve) for a polygon line drawn with a Line control. Read/write at design time and run time.
Line.LineSlant [= cSlant]
Return Value
cSlant
Specifies the slope direction of a line control or rounded corners for polygon lines drawn with a line control.The following table lists the values for cSlant.
cSlant
Description
\
Line slopes from upper left to lower right. (Default)
/
Line slopes from lower left to upper right.
S or s
Line is drawn as a Bezier curve when a valid array of coordinates is set for the PolyPoints property. To remove this setting, set LineSlant to "\" or "/".
Note
The PolyPoints array must specify a total of (3n + 1) coordinates with n representing the number of curves you want to draw a Bezier curve. If PolyPoints does not contain coordinates that form a valid polygon, and the "S" or "s" setting is specified, no line is drawn.
For more information, see PolyPoints Property.
Remarks
Applies To: Line Control
Code Example
The following example creates a form with a Line control and three command buttons that demonstrate the three values for the LineSlant property.
Public oForm
oForm = Createobject('Form')
With oForm
.AddObject('linSample','Line')
.AddObject('cmdSlantUp','cmdSlantUp')
.AddObject('cmdSlantDown','cmdSlantDown')
.AddObject('cmdBezier','cmdBezier')
.linSample.Top = 10
.linSample.Left = 25
.linSample.Width = 300
.linSample.Height = 200
.SetAll('Visible', .T.)
* Creates an array of points that define the curve.
Dimension aBezierPoints[4,2]
aBezierPoints[1,1]= 0
aBezierPoints[1,2]= 0
aBezierPoints[2,1]= 100
aBezierPoints[2,2]= 25
aBezierPoints[3,1]= 0
aBezierPoints[3,2]= 75
aBezierPoints[4,1]= 100
aBezierPoints[4,2]= 100
Endwith
oForm.Show(1)
* Defines a button that changes the slant of the line.
Define Class cmdSlantUp As CommandButton
Caption = 'Slant \<Up (/)'
Left = 25
Top = 220
Height = 25
Procedure Click
Thisform.linSample.Polypoints = ""
Thisform.linSample.LineSlant = '/' && Slant up
Endproc
Enddefine
* Defines a button that changes the slant of the line.
Define Class cmdSlantDown As CommandButton
Caption = 'Slant \<Down (\)'
Left = 125
Top = 220
Height = 25
Procedure Click
Thisform.linSample.Polypoints = ""
Thisform.linSample.LineSlant = '\' && Slant down
Endproc
Enddefine
* Defines a button that changes the line to a Bezier curve.
Define Class cmdBezier As CommandButton
Caption = 'Be\<zier Curve (S) '
Left = 225
Top = 220
Height = 25
Procedure Click
Thisform.linSample.Polypoints = "aBezierPoints" && Specifies points on the curve.
Thisform.linSample.LineSlant = 'S' && Specifies to display a curve.
Thisform.linSample.Visible = .T.
Thisform.Visible = .T.
Endproc
Enddefine