OK here is your first code fixed for smaller traingles:
I just moved the top,lft corner over -4 to center triangles then -STEP(width tri, height tri)
dang _Putimage works in Screen 0 and with hardware image, IT! (IT! = Imagine That!)
Code: (Select All)
Width 80, 25: _Font 16
fw = _FontWidth: fh = _FontHeight
t = _NewImage(fw * 2, fh, 32) ' INCREASE _NEWIMAGE SCREEN SIZE TO SHRINK TRIANGLE TO: t = _NewImage(120, 120, 32)
Rem t = _NewImage(120, 120, 32)
Screen t ' Remark or remove this line and Sleep: Screen 0 to hide image creation.
_Dest t
' Draw a triangle.
a = 6: c = 0
For i = 0 To 6
Line (a, c)-(a + i * 2, c)
a = a - 1
c = c + 1
Next
tri& = _CopyImage(t, 33)
Sleep: Screen 0 ' Remark or remove this line and Screen t to hide image creation.
_Dest 0
_FreeImage t
col = 32: row = 5: BarLength = 8
Locate row, col + 2: Print "__________Row"; row
Locate row + 8, col + 2: Print "__________Row"; row + 8
Locate row + 1, col
For j = 1 To BarLength
Locate , col: Print Chr$(219)
Next
sx1 = col * fw - fw - 2: sy1 = fh \ 2 - 2
sx2 = sx1 + c * 2 * fw: sy2 = sy1 + i * fh + 3
TopTriangle = row * fh - fh ' 1st num is row in Screen 0.
xfactor = fh * (i - 1) - TopTriangle
BottomTriangle = BarLength * fh
Do
_Limit 30
_PutImage (sx1 - 4, sy1 + TopTriangle)-Step(24, 16), tri& '<<<<<<<<<<<<
_PutImage (sx1 - 4, sy2 - xfactor + BottomTriangle)-Step(24, -16), tri& '<<Invert image.
LoopI just moved the top,lft corner over -4 to center triangles then -STEP(width tri, height tri)
dang _Putimage works in Screen 0 and with hardware image, IT! (IT! = Imagine That!)
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever

