Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   TBitmap + SetSize (https://www.clubdelphi.com/foros/showthread.php?t=87066)

marcelocarazas 11-11-2014 15:58:13

TBitmap + SetSize
 
Estimados amigos del foro tengo el siguiente codigo:


Código Delphi [-]

procedure TForm1.FormCreate(Sender: TObject);
begin
  QRCodeBitmap := TBitmap.Create;
  Update;
end


procedure TForm1.Update;
var
  QRCode: TDelphiZXingQRCode;
  Row, Column: Integer;
begin
  QRCode := TDelphiZXingQRCode.Create;
  try


    QRCode.Data := edtText.Text;
    QRCode.Encoding := TQRCodeEncoding(cmbEncoding.ItemIndex);
    QRCode.QuietZone := StrToIntDef(edtQuietZone.Text, 4);
    QRCodeBitmap.SetSize  (QRCode.Rows, QRCode.Columns);

    //QRCodeBitmap.s
    for Row := 0 to QRCode.Rows - 1 do
    begin
      for Column := 0 to QRCode.Columns - 1 do
      begin
        if (QRCode.IsBlack[Row, Column]) then
        begin
          QRCodeBitmap.Canvas.Pixels[Column, Row] := clBlack;
        end else
        begin
          QRCodeBitmap.Canvas.Pixels[Column, Row] := clWhite;
        end;
      end;
    end;
  finally
    QRCode.Free;
  end;
  PaintBox1.Repaint;
end;

En la parte que pinte de rojo me sale el siguiente error:

UnRedeclared identifier 'SetSize'

Por favor me pueden ayudar

Gracias y saludos

pacopenin 11-11-2014 16:38:59

Buenas.

Que versión de Delphi usas?

"TBitmap.setsize has been introduced in Delphi 2006 ..."

Échale un ojo a esto : http://stackoverflow.com/questions/8...t-to-a-tbitmap

Saludos,

marcelocarazas 11-11-2014 17:13:24

TBirmap + SetSize
 
Gracias por responder, y tenias razon la version de Delphi era el problema yo estoy trabajando en delphi 2007

Saludos Marcelo Carazas


La franja horaria es GMT +2. Ahora son las 20:53:47.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi