View Full Version : Printonsmart words over bitmap
laakerules
01-29-2012, 11:08 PM
Have Words over bitmap. How would i do this, curently it over writes it but creats a blank space inside my bitmap image. How can i make it keep the bitmap image in the back and then print something on that. I am doing this to make an ingame proggy, and yes the bitmap to image is incrementally larger than normal. But who cares things like this in a script make it awesome! :)
http://i1220.photobucket.com/albums/dd448/laakerules/Untitled-1.png
Drakan
01-30-2012, 01:46 AM
When using paintsmart, whatever comes second will paint over whatever is painted first. You want to paint the BitMap first then paint the text over it. Here I have a small sample on how to do that. When you need to update the text it is necessary to clear whatever text was there before. To do this, you may want to break the bitmaps up so you dont have to refresh the entire bitmap each time it needs to repaint.
http://paste.villavu.com/show/1896/
laakerules
01-30-2012, 01:51 AM
Cool ill try that out after im done making my new walking methods.
laakerules
01-30-2012, 02:43 AM
Ouhh thanks got it working. It looks sick, except for the frieking massive BMP inside the script! :P
Drakan
01-30-2012, 04:40 AM
Haha yeh those can be ugly ;) Glad you got it working.
Ouhh thanks got it working. It looks sick, except for the frieking massive BMP inside the script! :P
Create a sliver of the texture and just draw it as big as you want it(use a loop with an x value multiplier), like this forum's background.
YoHoJo
01-30-2012, 04:46 AM
I do it in this script:
http://www.youtube.com/watch?v=RSFNPTWTtKw&feature=youtu.be
Also when doing BMPToString UNTICK the Padr Output box, then your bitmap code will be just one line.
{************************************************* ******************************
procedure SMART_DrawBitmapWithTextMulti(Clear: Boolean; Bitmap: Integer; BmpPlacement: TPoint; TP: TStringArray; Shadow: Boolean; TxtPlacement: TPoint; Font: string; Colour: TColor);
By: Euphamism (THANKS A LOT!)
Description: Debugs bitmap with text on top. Only text refreshes, so no flashing
************************************************** *****************************}
procedure SMART_DrawBitmapWithTextMulti(Clear: Boolean; Bitmap: Integer; BmpPlacement: TPoint; TP: TStringArray; Shadow: Boolean; TxtPlacement: TPoint; Font: string; Colour: TColor);
var
I, B, H, Pic, TPH, Numb: Integer;
Offset: TPoint;
TTP: TPointArray;
Canvas: TCanvas;
begin
if (not SMART_DebugSetup) then
SMART_SetupDebug();
{if (Clear) then
SMART_ClearCanvasArea( PointToBox( Point(MSX1, MSY1) , Point(MSX2, MSY2) ) );
SMART_ClearCanvas();}
TPH := High(TP);
Offset := IntToPoint(TxtPlacement.x - BmpPlacement.x, TxtPlacement.y - BmpPlacement.y);
Pic := CopyBitmap(Bitmap);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
if Shadow then
try
FastSetPixel(Pic, TTP[b].x + 1 + Offset.x , TTP[b].y + Numb + 1 + Offset.y,131072);
except
end;
try
FastSetPixel(Pic, TTP[b].x + Offset.x, TTP[b].y + Numb + Offset.y, Colour);
except
end;
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, BmpPlacement.x, BmpPlacement.y);
FreeBitmap(Pic);
end;
Euphamism made me that, helpful to write text on a bitmap without it crapping up for flashing or anything lame like that, its really cool!
laakerules
01-30-2012, 05:01 AM
Lol ok, thanks YoHo. The only thing i dont like is how it flashes through retyping like a Wave though the text.
http://i1220.photobucket.com/albums/dd448/laakerules/prog.png
Thats how it looks now.
Inception
01-30-2012, 05:12 AM
That looks pretty fancy! Nice work!
laakerules
01-30-2012, 05:16 AM
Thank you, only issue that i wish would be cooler is the wave affect that the text has when it updates or the text flash when it updates. I wish it would just be updated 100% like injection bots that would be cool.
putonajonny
01-30-2012, 04:41 PM
Thank you, only issue that i wish would be cooler is the wave affect that the text has when it updates or the text flash when it updates. I wish it would just be updated 100% like injection bots that would be cool.
The wave effect is annoying, you could get rid of it by making it only clear the parts of the screen with variables on them,
laakerules
01-31-2012, 02:02 AM
Ya i fixed it up so my new version doesnt wave but just the variables1:)
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.