Canvas.Pixels := clWhite which makes only thát pixel transparent,.Brush.Handle := CreateSolidBrush(clWhite),.The following variations are tried to eliminate the call to FillRect, all with the same outcome (no transparancy): But why is that background color not used as the transparent color when Transparent is set true?Ĭonsider this simple test code: procedure TForm1.Button1Click(Sender: TObject) Ĭanvas.Draw(0, 0, Bmp) // A white block is drawnīmp. := // = 'clWhite'īmp.Canvas.FillRect(Rect(0, 0, 100, 100)) Ĭanvas.Draw(0, 100, Bmp) // "Nothing" is drawnįor some reason, the entire bitmap surface has to be painted before it can appear transparent, which sounds kind of odd. At least, a query on the Pixels property confirms. A newly created bitmap seems to have a (white) background by default.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |