1 registered members (AndrewAMD),
692
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Resizing Bitmaps
[Re: Yashas]
#411940
11/21/12 12:51
11/21/12 12:51
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
You can
- create a new bitmap with the required dimensions and copy the stuff over with bmap_blit or
- use a panel and use its scale_x and scale_y members. This however does not really change the size of the bitmap, but only the displayed size of the panel.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: Resizing Bitmaps
[Re: Uhrwerk]
#411960
11/21/12 15:03
11/21/12 15:03
|
Joined: Nov 2011
Posts: 139 India
Yashas
OP
Member
|
OP
Member
Joined: Nov 2011
Posts: 139
India
|
Can u give an example of using bmap_bilt? I don't understand the parameters and vector(x,y,z) ,now z(Hope not 3D bitmap ) what value do I need to give??
Last edited by Yashas; 11/21/12 15:04. Reason: Grammartical Correction + Fixes
|
|
|
Re: Resizing Bitmaps
[Re: Yashas]
#411961
11/21/12 15:06
11/21/12 15:06
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
The vector's z parameter is ignored. You can just use 0 for it. There is even an example in the manual that illustrates the usage of bmap_blit.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: Resizing Bitmaps
[Re: Yashas]
#411973
11/21/12 15:54
11/21/12 15:54
|
Joined: Nov 2011
Posts: 139 India
Yashas
OP
Member
|
OP
Member
Joined: Nov 2011
Posts: 139
India
|
Is this right?? bmap_blit(applet->Drag,Drag,vector(0,0,0),vector(100,100,0)); I am using a another computer(No Gamestudio Installed ).So I asked weather it's correct(Can't test).
|
|
|
Re: Resizing Bitmaps
[Re: Yashas]
#411974
11/21/12 16:05
11/21/12 16:05
|
Joined: Nov 2011
Posts: 139 India
Yashas
OP
Member
|
OP
Member
Joined: Nov 2011
Posts: 139
India
|
bmap_blit(Temp->Drag,Drag,vector(0,0,0),vector(100,100,0));
This line is producing a script Crash!! Complete Code:
Applet * CreateApplet(STRING * Name,STRING * Author,STRING * Version,STRING * Description,PANEL * Container,BMAP * Drag,int * Initilizer,int * Deinitlizer)
{
if(!Container) { return error("CreateApplet:Invalid Container."); }
if(!Initilizer) { return error("CreateApplet:Invalid Initilizer."); }
if(!Deinitlizer) { return error("CreateApplet:Invalid Deinitilizer."); }
if(!Name) { return error("CreateApplet:Invalid Name."); }
Applet * Temp = sys_malloc(sizeof(Applet));
Temp->Name = Name;
Temp->Author = Author;
Temp->Version = Version;
Temp->Description = Description;
Temp->Container = Container;
bmap_blit(Temp->Drag,Drag,vector(0,0,0),vector(100,100,0));
Temp->Initilize = Initilizer;
Temp->Deinitlize = Deinitlizer;
return Temp;
}
Thanks To All
|
|
|
Re: Resizing Bitmaps
[Re: Yashas]
#411976
11/21/12 16:27
11/21/12 16:27
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
*cough*initializing data*cough*
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: Resizing Bitmaps
[Re: Yashas]
#411981
11/21/12 16:39
11/21/12 16:39
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Temp->Drag is never initialized to anything. You are telling the engine to write into a garbage pointer, which obviously crashes.
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
|