[SUB]draw a frame into a panel bitmap

Posted By: txesmi

[SUB]draw a frame into a panel bitmap - 03/17/12 15:32

I added to the wiki a code snippet that draws a frame into a panel bitmap. Hope it is helpfull.

wiki entry

Salud!
Posted By: Aku_Aku

Re: [SUB]draw a frame into a panel bitmap - 03/17/12 16:06

Cool idea!
Is there an explanation of its usage somewhere on the internet?

Üdv!
Posted By: txesmi

Re: [SUB]draw a frame into a panel bitmap - 03/17/12 18:03

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
Posted By: Aku_Aku

Re: [SUB]draw a frame into a panel bitmap - 03/17/12 18:18

Thanks for the completion.
Posted By: sivan

Re: [SUB]draw a frame into a panel bitmap - 03/18/12 20:03

nice stuff
© 2023 lite-C Forums