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
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 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
Pixel_to_bmap #76972
06/07/06 16:17
06/07/06 16:17
Joined: Jun 2006
Posts: 214
Germany, NRW
T
TheThinker Offline OP
Member
TheThinker  Offline OP
Member
T

Joined: Jun 2006
Posts: 214
Germany, NRW
Hi,
It is possible to use pixe_to_bmap in the Extra-edition?
If it is possible, how I use it.
It's for a math-programm I wrote in delphi before. Now I try it in gs.
MfG,
thethinker

Re: Pixel_to_bmap [Re: TheThinker] #76973
06/07/06 18:05
06/07/06 18:05
Joined: Nov 2004
Posts: 888
B
beegee Offline
User
beegee  Offline
User
B

Joined: Nov 2004
Posts: 888
Yes it's possible, here's the code snippet:

Code:
var format; var pixel; // create the nec. variables
bmap PaintPic = <WhiteBitmap.tga>; // and the picture

format = bmap_lock(PaintPic,0); // first you have to unlock the bitmap, so you have the possibility to modify it
temp.red = 255; temp.green = 0; temp.blue = 0; // the color " red "
pixel = pixel_for_vec(temp,100,format); // create the pixel, with you want to draw
pixel_to_bmap(PaintPic,10,10,pixel); // draw the pixel onto the Position 10,10 at the bitmap
bmap_unlock(PaintPic); // unlock the Bitmap, so the modification will be showed



mfg beegee

-----------
GenuineMotors.de


Fratch - Newer statistics panel for GameStudio
Re: Pixel_to_bmap [Re: beegee] #76974
06/07/06 20:00
06/07/06 20:00
Joined: Jun 2006
Posts: 214
Germany, NRW
T
TheThinker Offline OP
Member
TheThinker  Offline OP
Member
T

Joined: Jun 2006
Posts: 214
Germany, NRW
Hi,
Thank you for help. But now, i have another problem. How can I save a painted bmp.
I tried to use game_save, but it creats only *.sav - files. I want to save the painted picture into the bmp format.
MfG,
TheThinker

Re: Pixel_to_bmap [Re: TheThinker] #76975
06/07/06 20:31
06/07/06 20:31
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
Use file_for_screen for this. This saves screenshots and otherwise the entire display.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Pixel_to_bmap [Re: ulillillia] #76976
06/08/06 06:43
06/08/06 06:43
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
Or look up bmap_for_screen in the manual.

Re: Pixel_to_bmap [Re: vlau] #76977
06/08/06 15:22
06/08/06 15:22
Joined: Jun 2006
Posts: 214
Germany, NRW
T
TheThinker Offline OP
Member
TheThinker  Offline OP
Member
T

Joined: Jun 2006
Posts: 214
Germany, NRW
Hi,
The problem is, that bmap_for_screen doesn't save a file.

Another problem is, that file_for_screen is not supported by Sybex Extra 6.1

I don't see any possibility to solve this problem.

But, if anybody have a sollution, please help me

MfG,
TheThinker

Last edited by TheThinker; 06/08/06 15:22.

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