title: How can I replace color on TCanvas on Delphi?
body: <p>How can I replace color on TCanvas on Delphi XE2? The following code works incredibly slow:</p>
  
  <pre><code>  for y := ARect.Top to ARect.Top + ARect.Height - 1 do
      for x := ARect.Left to ARect.Left + ARect.Width - 1 do
        if Canvas.Pixels[x, y] = FixedColor then
          Canvas.Pixels[x, y] := Canvas.Pixels[ARect.Left, ARect.Top];
  </code></pre>