ASPPainter::Matrix::Matrix.vbs
Dim im
Dim mc(5,5)
Set im = CreateObject("ASPPainter.Pictures.1")
im.SetBKColor 255,255,255,0
im.Create 200,100
im.SetColor 255,255,0,255
im.SetLineWidth 5
im.DrawLine 0,0,200,100
im.SetFormat 0
im.SaveToFile "C:\matrix.png"
For i = 1 to 5
For j = 1 to 5
mc(i,j) = 0.0
next
next
For j = 1 to 5
mc(j,j) = CInt(1)
next
mc(4,4) = 0.5
im.SetImageIndex 1
im.SetBKColor 255,255,255,0
im.Create 200,100
im.SetColor 0,255,0,255
im.SetLineWidth 10
im.DrawLine 0,100,200,0
im.SaveToFile "C:\matrix1.png"
'im.SetImageIndex
'im.BlendImage 0,1,0,0,0,0,200,100
'im.SaveToFile "C:\matrix2.png"
im.SetColorMatrix mc
im.DrawColorMatrix 0,1,0,0,0,0,200,100 ,200,100
im.SetFormat 0
im.SetImageIndex 0
im.SaveToFile "C:\matrix3.png"
im.DestroyALL
Set im = Nothing
 |
 |
 |
| Picture 1. matrix.png |
Picture 2. matrix2.png |
Picture 3. matrix3.png |
More samples:
Arc,
Beziers, Circle,
Ellipse,
Line, Pie,
Rectangle, Unclosed
polygon
See also:
SetHTMLColor,
SetBKColor, Create,
SetColor ,
SetLineWidth , DrawArc
, DrawFilledRectangle
, DrawBezier ,
DrawCircle , DrawFilledCircle
, DrawEllipse ,
DrawFilledEllipse ,
DrawRectangle ,
DrawUnclosedPolygon , SaveToFile
, DestroyALL