SetLineWidth upper limit?

BlitzMax Forums/BlitzMax Beginners Area/SetLineWidth upper limit?

Jean-Marie(Posted 2009) [#1]
Hi,

the question has already been asked, but not directly answered.

I am trying to draw lines with the mouse with different widths.

The SetLineWidth seems to change width up to about 5 pixels. SetLineWidth(50), SetLineWidth(10) and SetLineWidth(5) have the same visual result.

Any tip? How can I get this to work?

Jean-Marie.


matibee(Posted 2009) [#2]
Looks like it's using glLineWidth which the upper limit is set by your video card / drivers. Look to using rotated DrawRect calls instead.


Jean-Marie(Posted 2009) [#3]
hi matibee,

you're right; i tried on another computer, SetLineWidth works properly.

Thanks for the hint for rotated DrawRect, I'll have a look at it.


matibee(Posted 2009) [#4]
Sorry for the short reply [i'm working!] I can provide a code snippet later if you struggle.


ImaginaryHuman(Posted 2009) [#5]
Yeah it's driver dependent. On my iMac I can't get the width to go below 1.0 in certain blend modes, but it will go quite high. The only problem with it is that it builds the thick line out of rectangles expanded perpendicular to the line and as the line gets thicker you start to see big traingular gaps between the rectangles (ie when you are doing a curved line or sequence of lines). It tends not to take multiple lines into account. On a different computer I couldn't get the line width to go above 5 either.


jkrankie(Posted 2009) [#6]
most card's i've tried won't go over 5 or 10.

Cheers
Charlie