From: Philipp Crocoll Subject: Re: Star Wars Credits Date: 10 Oct 1999 00:00:00 GMT Message-ID: <3800EC01.FBC9BF82@gmx.de> Content-Transfer-Encoding: 7bit References: <7tkrdh$erg7@forums.borland.com> X-Accept-Language: de Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.delphi.graphics I started work for you today. Here I have some (sorry, not commented) code. It is not yet ready, but it works already. You need an original image (your text, "orgImg") and a new image ("newImg") on your form. Then you can use the following method. Using canvas it is absolutely slow, but by using DDraw that could be solved. The problem with that version is, that it cannot scroll. Just have a look at it and tell me if it is what you were looking for. Then I'll finish it. procedure TForm1.GetStarWarsText; {Written by Philipp Crocoll 10.10.1999} var xc,yc:Integer; orgCoord:TPoint; newTopEdge:Integer; startX,stopX:Real; mLeftSide:Real; screenZ,screenTopY:Integer; textY:Integer; mg1,mg2:Real; p1,r1,r2:TPoint; param:Real; begin textY:=-30; mg1:=textY/(orgImg.Width/2+OrgImg.Height); mg2:=textY/(orgImg.Width/2); screenZ:=Round(newImg.Height/(mg1-mg2)); screenTopY:=Round(mg1*screenZ); newTopEdge:=Round(newImg.Width*orgImg.Width/(orgImg.width/2+orgImg.Height)/2); mLeftSide:=(newTopEdge-newImg.Width)/2/newImg.Height; startX:=(newImg.Width-newTopEdge)/2; stopX:=newImg.Width-startX; p1.x:=orgImg.width div 2; p1.y:=textY; r1.x:=OrgImg.Height; r1.y:=0; r2.x:=screenZ; for yc:=1 to newimg.height do begin startX:=startX+mLeftSide; stopX:=stopX-mLeftSide; r2.y:=screenTopY-yc; param:=(p1.y*r2.x-p1.x*r2.y)/(r1.x*r2.y-r1.y*r2.x); OrgCoord.Y:=OrgImg.Height-Round(OrgImg.Height*param); for xc:=Round(startX) to Round(stopX) do begin orgCoord.x:=Round((xc-startX)/(stopx-startx)*orgImg.width); newImg.canvas.pixels[xc,yc]:=orgImg.canvas.pixels[orgCoord.x,orgCoord.y]; end; end; end;