Hello everyone!
Hey, whatâs an easy function to draw a line from one point to another in
a surface? Iâm on Lua so I canât use additional SDL libraries like
SDL_draw.
Thanks!
Hello everyone!
Hey, whatâs an easy function to draw a line from one point to another in
a surface? Iâm on Lua so I canât use additional SDL libraries like
SDL_draw.
Thanks!
L-28C wrote:
Hello everyone!
Hey, whatâs an easy function to draw a line from one point to another in
a surface? Iâm on Lua so I canât use additional SDL libraries like
SDL_draw.
Depends on what kind of speed, quality and features you are
looking for⌠you might want to look around libsdl.org.â
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
I just want something thatâll draw white pixels between 2 pointsâŚ
Nothing fancy.
Speed shouldnât be an issue here. Thanks!
Kein-Hong Man wrote:> L-28C wrote:
Hello everyone!
Hey, whatâs an easy function to draw a line from one point to another in
a surface? Iâm on Lua so I canât use additional SDL libraries like
SDL_draw.Depends on what kind of speed, quality and features you are
looking for⌠you might want to look around libsdl.org.
Drawing a simple line is pretty complicated actually!> ----- Original Message -----
From: sdl-bounces@lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of L-28C
Sent: Tuesday, February 20, 2007 7:12 PM
To: sdl at libsdl.org
Subject: Re: [SDL] Draw line function?I just want something thatâll draw white pixels between 2 pointsâŚ
Nothing fancy.Speed shouldnât be an issue here. Thanks!
Kein-Hong Man wrote:
L-28C wrote:
Hello everyone!
Hey, whatâs an easy function to draw a line from one point to another in
a surface? Iâm on Lua so I canât use additional SDL libraries like
SDL_draw.Depends on what kind of speed, quality and features you are
looking for⌠you might want to look around libsdl.org.
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Drawing a simple line is pretty complicated actually!
True, and doubly so in Lua.
There isnât a line drawing function in SDLâŚyouâd have to touch the
pixels directlyâŚIâm not sure if thatâs possible from Lua.
âryan.
Google for âBresenhamâs algorithmâ.On Tue February 20 2007 18:55, L-28C wrote:
Hello everyone!
Hey, whatâs an easy function to draw a line from one point to another in
a surface? Iâm on Lua so I canât use additional SDL libraries like
SDL_draw.Thanks!
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
There isnât a line drawing function in SDLâŚyouâd have to touch the
pixels directlyâŚIâm not sure if thatâs possible from Lua.
If speed isnât an issue, you can SDL_FillRect with width and height of
one.â
Jukka-Pekka Manninen
SDL_gfx is the way you want to go.
SDL itself does not have line drawing primitives. My Lua/SDL binding
(which was part of LuaX) actually had SDL_gfx âbuilt-inâ for this
reason. And I do have one extensive demo app which exercises the
primitives.
The binding can either be used with the custom LuaX distro, or recent
code can be compiled for stock Lua but there is no such distribution
out, yet. I am waiting for a CPAN-kind module deployment framework
for Lua.
Give me a line if interested, Iâll help you get SDL_gfx rolling.
Thereâs actually a video of SDL_gfx on PocketPC here:
http://kotisivu.dnainternet.fi/askok/luax/luax/video1.html )
-asko
L-28C kirjoitti 21.2.2007 kello 4.55:> Hello everyone!
Hey, whatâs an easy function to draw a line from one point to
another in
a surface? Iâm on Lua so I canât use additional SDL libraries like
SDL_draw.Thanks!
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org