I need to find a way to :
- draw a bitmap/canvas image on another canvas image
- make a canvas image have transparency support
- merge bitmaps together
- convert canvas to bitmap
Any ideas?
I need to find a way to :
- draw a bitmap/canvas image on another canvas image
- make a canvas image have transparency support
- merge bitmaps together
- convert canvas to bitmap
Any ideas?
<SmarterC> mixster: The only reason so many people are homosexuals
im a little lost on what u want but maybe (prbly not) you could set 1 as a desktop background and the other one open in a window then go 2 invida options to trancparency and when you got it the way u want press prn scr? lol im crazy...if this is wat u wanted? i duno im lost!
No, I'm trying to render text on a canvas image (drawing on tiles,meaning the text bitmapo must be split into pieces in order to get ouputted properly, which would then be displayed on the canvas)
<SmarterC> mixster: The only reason so many people are homosexuals
I think theres a "DrawText" or something that can draw a bitmap, I can tell you the Text->Bitmap if you want.
The jealous temper of mankind, ever more disposed to censure than
to praise the work of others, has constantly made the pursuit of new
methods and systems no less perilous than the search after unknown
lands and seas.
SCAR Code:procedure SliceBitmap(bitmap,locx,locy:integer);
var x,y,width,height,CurrentX,xcounter:integer;
begin
GetBitmapSize(bitmap,width,height);
SetTransparentColor(bitmap,clblack)
writeln('Width:'+IntToSTr(width)+'Height:'+IntToSTr(Height));
y:=0;
repeat
begin
x:=0;
repeat
CurrentX:=x;
XCounter:=x/tilewidth
writeln('X:' +IntToStr(CurrentX)+'/'+IntToStr(width));
if x>TileWidth*XCounter then
begin
FastSetPixel(Text_Layer[whichtiles(locx+x,locy+y)+1], x, y ,FastGetPixel(bitmap,x,y))
LoadSingleTile(whichtiles(locx+x,locy+y)+1)
end else
FastSetPixel(Text_Layer[whichtiles(locx+x,locy+y)], x, y ,FastGetPixel(bitmap,x,y));
X:=x+1;
until(X=Width+1)
end;
writeLn('started freshpixelcolumn":'+ IntToStr(y)+'/'+IntToStr(height));
y:=y+1;
until(y=height+1)
end;
procedure CanvasText(text:string; x,y:integer);
var a,tempbmp,bmpwidth,bmpheight,tileresult,totalwidth,totalheight:integer;
BitmapCropCanvas,BitmapCropCanvas2:TCanvas;
begin
tempbmp:=CreateBitmapMaskFromText( text, UpChars);
GetBitmapSize( tempbmp, bmpwidth, bmpheight);
totalWidth:=bmpwidth/TileWidth;
if(bmpwidth mod TileWidth <> 0)then totalWidth:=totalWidth+1;
totalHeight:=bmpheight/TileHeight;
if(bmpheight mod TileHeight <> 0)then totalHeight:=totalHeight+1;
TileResult:=whichtiles( x, y)
Writeln( IntToStr( TileResult));
{Text_Layer[whichtiles( x, y)]:=tempbmp; }
SliceBitmap(tempbmp,x,y);
{ LoadSingleTile(whichtiles(x,y));
if(not(totalwidth=1))then
begin
for a:=1 to totalwidth-1 do
begin
LoadSingleTile(whichtiles(x,y)+a);
end;
end;
if(not(totalHeight=1))then
begin
for a:=1 to totalHeight-1 do
begin
LoadSingleTile(whichtiles(x,y)+(a*16));
end;
end; }
end;
the output of: CanvasText('20...21',100,40); is this:
The transparency has gone,and the part of the text bitmap on the second tile seemed to have been copied from the first one..
Any ideas?
<SmarterC> mixster: The only reason so many people are homosexuals
Canvas.TextOut can be used for text.
I can't really help you with the transparency though.
The best way to contact me is by email, which you can find on my website: http://wizzup.org
I also get email notifications of private messages, though.
Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
Documentation | Source | Simba Bug Tracker on Github and Villavu )
My (Blog | Website)
how can I use this Canvas.textOut feature?
<SmarterC> mixster: The only reason so many people are homosexuals
There are currently 1 users browsing this thread. (0 members and 1 guests)