title: How to get bitmap transparancy without the need to paint first?
body: <p>A newly created bitmap seems to have a (white) background by default. At least, a query on the Pixels property confirms. But why is that background color not used as the transparent color when <code>Transparent</code> is set true?</p>
  
  <p>Consider this simple test code:</p>
  
  <pre><code>procedure TForm1.Button1Click(Sender: TObject);
  var
    Bmp: TBitmap;
  begin
    Bmp := TBitmap.Create;
    try
      Bmp.Width := 100;
      Bmp.Height := 100;
      Bmp.Transparent := True;
      Canvas.Draw(0, 0, Bmp);                              // A white block is drawn
      Bmp.Canvas.Brush.Color := Bmp.Canvas.Pixels[0, 99];  // = 'clWhite'
      Bmp.Canvas.FillRect(Rect(0, 0, 100, 100));
      Canvas.Draw(0, 100, Bmp);                            // "Nothing" is drawn
    finally
      Bmp.Free;
    end;
  end;
  </code></pre>
  
  <p>For some reason, the entire bitmap surface has to be painted before it can appear transparent, which sounds kind of odd.</p>
  
  <p>The following variations are tried to eliminate the call to <code>FillRect</code>, all with the same outcome (no transparancy):</p>
  
  <ul>
  <li>Only setting <code>Brush.Color</code>,</li>
  <li><code>Brush.Handle := CreateSolidBrush(clWhite)</code>,</li>
  <li><code>PixelFormat := pf32Bit</code>,</li>
  <li><code>IgnorePalette := True</code>,</li>
  <li><code>TransparantColor := clWhite</code>,</li>
  <li><code>TransparantMode := tmFixed</code>,</li>
  <li><code>Canvas.Pixels[0, 99] := clWhite</code> which makes only thát pixel transparent,</li>
  <li><code>Modified := True</code>.</li>
  </ul>
  
  <p>So, the wish is to paint only a portion of a newly created bitmap and get the remaining surface transparent.</p>
  
  <p>Using: Delphi 7, Win 7/64.</p>