Ver Mensaje Individual
  #1  
Antiguo 11-11-2014
marcelocarazas marcelocarazas is offline
Miembro
NULL
 
Registrado: jul 2014
Posts: 27
Reputación: 0
marcelocarazas Va por buen camino
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

Última edición por ecfisa fecha: 11-11-2014 a las 16:12:11.
Responder Con Cita