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 |