这也叫超难问题?其实很简单,就是把图画的画布上,再按点取出来。比例自己调就好啦。以下是我做的一个相关的代码片断,自己看一看吧。
Image1.Canvas.Brush.Color := clWhite;
Image1.Canvas.Pen.Color := clWhite;
Image1.Canvas.FillRect(Image1.ClientRect);
sz := Image1.Canvas.TextExtent(txtText.Text);
Image1.Canvas.TextOut(0, 0, txtText.Text);
for Y := 0 to sz.cy do begin
S := '';
for X := 0 to sz.cx - 1 do begin
if Image1.Canvas.Pixels[X, Y] = clWhite then
S := S + ' '
else
S := S + '*';
end;
while (S <> '') and (Copy(S, Length(S) - 1, 2) = ' ') do
SetLength(S, Length(S) - 2);