Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Docs clarification: What's a hairline line?

This thread is locked; no one can reply to it. rss feed Print
Docs clarification: What's a hairline line?
Chris Katko
Member #1,881
January 2002
avatar

https://www.allegro.cc/manual/5/al_draw_line

thickness - Thickness of the line, pass <= 0 to draw hairline lines

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

jmasterx
Member #11,410
October 2009

It's a line that recedes with time :'(.

SiegeLord
Member #7,827
October 2006
avatar

It basically means that it's thickness is infinitesimal. You still see it, but e.g. if you zoom in with a transformation, it won't get thicker. At the same time, it won't disappear if you zoom out either. It's in some sense the smallest thing the device can draw to represent the mathematical line segment.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Elias
Member #358
May 2000

As a side effect, hairlines are undefined to as in which pixels are lit up. If you specify a thickness, the GPU guarantees that each pixel whose center lies inside of the line is lit. If you draw a hairline, the GPU is pretty much free to do whatever it wants.

--
"Either help out or stop whining" - Evert

SiegeLord
Member #7,827
October 2006
avatar

Elias said:

As a side effect, hairlines are undefined to as in which pixels are lit up.

That's mostly because OpenGL neglected to specify this, they could have easily came up with a definition (like the one A4 uses, which is just nearest pixel to the line).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

amarillion
Member #940
January 2001
avatar

jmasterx said:

It's a line that recedes with time :'(.

;D ;D ;D

Go to: