Ver Mensaje Individual
  #7  
Antiguo 28-07-2015
wolfran_hack wolfran_hack is offline
Miembro
 
Registrado: abr 2013
Posts: 97
Reputación: 12
wolfran_hack Va por buen camino
No en Delphi XE8 no funciona. Encontré que se puede hacer con canvas pero no aparece el texto.

Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
  MyRect: TRectF;
  x1, y1, x2, y2: integer;
begin
  x1 := 60;
  y1 := 60;
  x2 := MainImage.Bitmap.Canvas.Width - 60;
  y2 := MainImage.Bitmap.Canvas.Height - 60;
  MyRect := TRectF.Create(x1, y1, x2, y2);
  // fills and draws the text in the specified rectangle area of the canvas
  MainImage.Bitmap.Canvas.BeginScene;
  MainImage.Bitmap.Canvas.FillText(MyRect, TextEdit.Text, false, 100,[TFillTextFlag.RightToLeft], TTextAlign.Center, TTextAlign.Center);
  MainImage.Bitmap.Canvas.EndScene;
  // updates the bitmap
  //MainImage.Bitmap.BitmapChanged;
end;
Responder Con Cita