|
7 registered members (TipmyPip, Martin_HH, Volkovstudio, AndrewAMD, JMMAC, Grant, 1 invisible),
5,432
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Draw_Line() - under a panel
[Re: JeyKey II]
#128254
05/06/07 00:33
05/06/07 00:33
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
you could create a fullscreen panel which has a specific layer that is beneath that panel which should overlap the line. Then you could implement a fast (Bresenham) line drawing function that uses that panel as canvas. http://www.cs.helsinki.fi/group/goa/mallinnus/lines/bresenh.html
Last edited by HeelX; 05/06/07 01:20.
|
|
|
Re: Draw_Line() - under a panel
[Re: dennis]
#128258
05/13/07 13:24
05/13/07 13:24
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Quote:
I want to draw a grid (every 10 pixel a line vertically and horizontally) and some rectangulars. (about 300 lines)
Good news for you! The A6 beta has the following new feature:
Quote:
Setting a panel size that exceeds the panel bitmap size creates a repeating background pattern on the panel. - If the size is smaller than the panel bitmap, the bitmap is clipped. If the size is larger, the bitmap is repeated on the panel background, and thus can be used for a background pattern.
So you could use a panel with a "grid"-tile and make the size as large as the screen or such. This is very fast of course and better than drawing these lines.
Just stay cool and wait for the public beta!
|
|
|
Re: Draw_Line() - under a panel
[Re: HeelX]
#128259
05/13/07 13:50
05/13/07 13:50
|
Joined: Jul 2006
Posts: 150 Deutschland/Germany, nahe Hamb...
dennis
OP
Member
|
OP
Member
Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
|
Cool! That's good! But which Beta do you mean? (A7 or a version above 6.5) I forgot to say that I want to make the distances between two lines of the grid "flexible" (the user should be able to change it). For that I would have to use different BMAPs with different distances. Another solution for this would be scaling the BMAP but then it gets blurred (i think - i did not try that) What do you think about creating two BMAPS (one line vertically and another one horizontally) and then use PAN_CREATE to create a grid... (Is that to slow?)
|
|
|
|