can i draw freedom shape
Posted: Thu Jun 14, 2007 8:40 am
hi
can i draw a freedom shape
and can i fill it by a color
thanks
can i draw a freedom shape
and can i fill it by a color
thanks
Steema Software - Customer Support Forums
http://216.92.243.79/support/
Code: Select all
Private Sub TChart1_OnAfterDraw()
With TChart1.Canvas
.Pen.Color = vbBlue
.Brush.Color = vbRed
a = Array(100, 100, 150, 50, 170, 100, 250, 100, 200, 200)
.Polygon 5, a
End With
End Sub
Code: Select all
Private Sub Form_Load()
TChart1.Series(0).FillSampleValues 10
End Sub
Private Sub TChart1_OnAfterDraw()
With TChart1.Canvas
.Pen.Color = vbBlue
.Brush.Color = vbRed
a = Array(TChart1.Axis.Left.Position, TChart1.Axis.Top.Position, _
TChart1.Axis.Left.Position, TChart1.Axis.Bottom.Position, _
TChart1.Series(0).CalcXPos(5), TChart1.Series(0).CalcYPos(5))
.Polygon 3, a
End With
End Sub
Code: Select all
Private Sub Form_Load()
TChart1.Series(0).FillSampleValues 10
TChart1.Environment.InternalRepaint
End Sub
Private Sub TChart1_OnBeforeDrawChart()
With TChart1
p1x = .Series(0).CalcXPos(2)
p1y = .Axis.Left.CalcYPosValue(.Series(0).asCandle.HighValues.Value(2))
p2x = .Series(0).CalcXPos(4)
p2y = .Axis.Left.CalcYPosValue(.Series(0).asCandle.HighValues.Value(4))
p3x = p2x
p3y = .Axis.Left.CalcYPosValue(.Series(0).asCandle.LowValues.Value(4))
p4x = p1x
p4y = .Axis.Left.CalcYPosValue(.Series(0).asCandle.LowValues.Value(2))
End With
With TChart1.Canvas
.Pen.Color = vbBlue
.Brush.Color = vbRed
a = Array(p1x, p1y, p2x, p2y, p3x, p3y, p4x, p4y)
.Polygon 4, a
End With
End Sub
Private Sub TChart1_OnScroll()
TChart1.Environment.InternalRepaint
End Sub
Private Sub TChart1_OnUndoZoom()
TChart1.Environment.InternalRepaint
End Sub
Private Sub TChart1_OnZoom()
TChart1.Environment.InternalRepaint
End Sub