PaintTo not working on GTK2
Original Reporter info from Mantis: montanus_@web.de
-
Reporter name: Johannes Müller
Original Reporter info from Mantis: montanus_@web.de
- Reporter name: Johannes Müller
Description:
I used PaintTo to save a TBarChart into an image file.
The TBarChart is within a ScrollBox.
On windows it is possible to write the complete BarChart with PaintTo on an Image.
But on Linux the resulting image is destructed.
Attached a small Demo to demonstrate the Bug.
Additional information:
The Code:
procedure ChartToBmp(const BarChart: TBarChart);
var
Bitmap: TBitmap;
begin
Bitmap := TBitmap.Create;
try
Bitmap.Width := BarChart.Width;
Bitmap.Height := BarChart.Height;
BarChart.PaintTo(Bitmap.Canvas, 0, 0);
Bitmap.SaveToFile(BarChart.Name + '.bmp');
finally
Bitmap.Free;
end;
end;
Mantis conversion info:
- Mantis ID: 14201
- Version: 0.9.27 (SVN)
- Fixed in version: 0.9.27 (SVN)
- Fixed in revision: 20984 (#e97576c1)
- Target version: 1.0.0
- LazTarget: 1.0