I try to rewrite an FMX project in VCL.
Code for QR-code drawing in FMX:
for Column := 0 to QRCode.Columns - 1 do
begin
if QRCode.IsBlack[Row, Column] then
QRCodeBitmap.ClearRect(TRectF.Create(PointF(Column, Row) * Scale,
Scale, Scale), TAlphaColors.Black);
end;
How to replace QRCodeBitmap.ClearRect()
in VCL?
I try like this:
if (QRCode.IsBlack[Row, Column]) then
begin
QRCodeBitmap.Canvas.Pixels[Column, Row] := clBlack;
end else
begin
QRCodeBitmap.Canvas.Pixels[Column, Row] := clWhite;
end;
but it does not work like I want.