Тут такая особенность,
WritePixel и
WritePixelFast по разному отображаются, если установлен
viewPort 60, 40, 100, 40, вот и стоит заменить
linebreak на функцию в
Оффтопе.
Function linebreak( x1#, y1#, x2#, y2#, byte% = %11111111111111111111111111111111)
if x1 = x2 and y1 = y2 then plot x1, y1
local rgb = ColorBlue() Or ( ColorGreen() Shl 8) Or ( ColorRed() Shl 16)
local xd# = x2 - x1
local yd# = y2 - y1
local steps#
If Abs(xd) > Abs(yd) Then steps = Abs(xd) Else steps = Abs(yd)
x2 = xd / Float(steps)
y2 = yd / Float(steps)
local ob = 0
local bit = False
For steps = steps To 1 Step -1
bit = byte Shr ob And %1
if y1 > 0 and y1 < GraphicsHeight() - 1 and x1 > 0 and x1 < GraphicsWidth() - 1 then
If bit = 1 Then WritePixel x1, y1, rgb
endif
x1 = x1 + x2
y1 = y1 + y2
ob = ob + 1
If ob >= 32 Then ob = 0
Next
End Function