Psy, how about a 1-pixel-wide sprite, say 1x100, and point & scale it as you need?
add: 1x1 works?
// show all errors
SetErrorMode(2)
// set window properties
SetWindowSize( 256, 231, 1 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 256, 231 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
img = GetImage(0,0,1,1)
line = CreateSprite(line)
SetSpriteColor(line,128,128,128,255)
sx = 0 : sy = 0
SetSpriteOffset(line,0,0)
do
if GetRawKeyState(27) = 1 then Exit `[ESC]
if GetPointerPressed()
sx = GetPointerX() : sy = GetPointerY()
SetSpritePosition(line,sx,sy)
endif
mx = GetPointerX() : my = GetPointerY()
distance# = sqrt(abs(sx-mx)^2+abs(sy-my)^2)
SetSpriteSize(line,distance#,1)
xd# = sx-mx : yd# = sy-my
angle# = ATANFULL(xd#,yd#)+90
SetSpriteAngle(line,angle#)
Sync()
loop