我想在TImage控件表面上写几个字,用了Image1.Picture.Bitmap.Canvas.TextOutA(0, 0, 'helle')方法,但一调用这个方法整个图片就消息了。不知道谁有更好的方法(表面放Label的不算)

解决方案 »

  1.   

    我好久没用Delphi了,有一种方法可以实现,代码可能不对,你自己改一下吧:
    var
    bmp: TBitmap;
    begin
    bmp := TBitmap.Create;
    bmp.Assign(Image1.Picture.Bitmap);
    bmp.Canvas.TextOut(0, 0, 'helle');
    Image1.Picture.Bitmap.Assign(bmp);
    bmp.free;
    end;
      

  2.   

    image1.picture.bitmap.Canvas.Brush.Style:=bsclear;
    Image1.Picture.Bitmap.Canvas.TextOut(0, 0, 'helle');
      

  3.   

    可以的,不过仅限于bmp格式 with Image1.Picture.Bitmap.Canvas do
     begin
       Font.Color:=clRed;
       font.Size:=23;
       Brush.Style:=bsBDiagonal;
       TextOut(300, 200, 'helle');
     end;
      

  4.   

    hiflower(花) 的看起来简单些,但好像不行啊
      

  5.   

    行不行试过再说仅限于bmp格式,刚才已经说了