Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/26/26 17:55
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
7 registered members (TipmyPip, Martin_HH, Volkovstudio, AndrewAMD, JMMAC, Grant, 1 invisible), 5,432 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Draw_Line() - under a panel #128252
05/05/07 16:55
05/05/07 16:55
Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
dennis Offline OP
Member
dennis  Offline OP
Member

Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
Hi!

Is it possible to draw a panel OVER a line that was drawn with the DRAW_LINE instruction?

Re: Draw_Line() - under a panel [Re: dennis] #128253
05/05/07 19:54
05/05/07 19:54
Joined: Dec 2002
Posts: 1,999
Switzerland Zürich
JeyKey II Offline
Serious User
JeyKey II  Offline
Serious User

Joined: Dec 2002
Posts: 1,999
Switzerland Zürich
Try it You will know it


[Jeder ist sich selbst am Nächsten]
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
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

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: HeelX] #128255
05/13/07 11:06
05/13/07 11:06
Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
dennis Offline OP
Member
dennis  Offline OP
Member

Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...

pixel_to_bmap(BMAP* bmap,var x,var y,var pixel);

Are you thinking of drawing a line consisting of many points (drawn with the instruction above) on the fullscreen panel?

Re: Draw_Line() - under a panel [Re: dennis] #128256
05/13/07 11:09
05/13/07 11:09
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Clearing a panel with bmap_fill(BMAP*,vector(0,0,0), 0); and the panel owning the OVERLAY flag is fast enough for this. Drawing a line of let us say.. 200 pixels is fast (instead of writing the WHOLE bmap!).

This is just a solution for his problem, no one talks about performance

Re: Draw_Line() - under a panel [Re: HeelX] #128257
05/13/07 11:40
05/13/07 11:40
Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
dennis Offline OP
Member
dennis  Offline OP
Member

Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...

Thanks for the quick answer!

I want to draw a grid (every 10 pixel a line vertically and horizontally) and some rectangulars. (about 300 lines)

This would be slow with painting on the BMAP.........(if i am wrong just say)

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
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

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 Offline OP
Member
dennis  Offline 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?)

Re: Draw_Line() - under a panel [Re: dennis] #128260
05/13/07 13:55
05/13/07 13:55
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
i would create a simple dll function (or do it with lite-c) which draws a line with direct3d. you can draw them before the panels get drawn and i think it would be much faster than with the pixel commands.

Re: Draw_Line() - under a panel [Re: ventilator] #128261
05/13/07 14:04
05/13/07 14:04
Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...
dennis Offline OP
Member
dennis  Offline OP
Member

Joined: Jul 2006
Posts: 150
Deutschland/Germany, nahe Hamb...

Good idea!

The problem is that I don't know how to write a dll....
(I have the MSVC and the A6 SDK but I did not found a simple and good tutorial yet)

Adding the code an describing in a few sentences how I compile it would be great!

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1