Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (Grant), 999 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[SUB]draw a frame into a panel bitmap #397311
03/17/12 15:32
03/17/12 15:32
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline OP
Serious User
txesmi  Offline OP
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
I added to the wiki a code snippet that draws a frame into a panel bitmap. Hope it is helpfull.

wiki entry

Salud!

Re: [SUB]draw a frame into a panel bitmap [Re: txesmi] #397312
03/17/12 16:06
03/17/12 16:06
Joined: Sep 2009
Posts: 987
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 987
Budapest
Cool idea!
Is there an explanation of its usage somewhere on the internet?

Üdv!

Re: [SUB]draw a frame into a panel bitmap [Re: Aku_Aku] #397327
03/17/12 18:03
03/17/12 18:03
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline OP
Serious User
txesmi  Offline OP
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Hi!

FRAME struct
is a struct that allocates all the pointers to BMAPs

You can create all you want with 'frame_create' function. Its parameter are the images for the frame. This function returns a pointer to the created struct.

Code:
var *myFrame = frame_create ( "center.tga", "top.tga", "bottom.tga", "left.tga", "right.tga", "top-left.tga", "top-right.tga", "bottom-left.tga", "bottom-right.tga" );



Use 'frame_remove ( myFrame )' to remove allocated frame sets before exiting.

Draw the frame with 'pan_frame ( myPanel, myFrame, SizeX, SizeY )'. It fits the panel size and bitmap size to given dimensions.

Salud!

PD: I thought main function was enough explanatory

Re: [SUB]draw a frame into a panel bitmap [Re: txesmi] #397328
03/17/12 18:18
03/17/12 18:18
Joined: Sep 2009
Posts: 987
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 987
Budapest
Thanks for the completion.

Re: [SUB]draw a frame into a panel bitmap [Re: Aku_Aku] #397401
03/18/12 20:03
03/18/12 20:03
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
nice stuff


Free world editor for 3D Gamestudio: MapBuilder Editor

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

Gamestudio download | chip programmers | 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