Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2420 - SaveToBitmapFile saves always the same bitmap
Summary: SaveToBitmapFile saves always the same bitmap
Status: RESOLVED WORKSFORME
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Chart (show other bugs)
Version: unspecified
Hardware: PC Windows
: Lowest minor
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-05 08:09 EDT by SVogler
Modified: 2021-05-07 03:11 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version: RAD 10.3 Rio


Attachments
project from forums (2.56 KB, application/x-zip-compressed)
2021-05-07 03:11 EDT, yeray alonso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SVogler 2021-05-05 08:09:27 EDT
also after the TChart has been changed!
Comment 1 SVogler 2021-05-07 03:04:04 EDT
Solved by using this:

https://www.steema.com/support/viewtopic.php?p=30317


Var
   BMP:    TBitmap;
begin
   BMP := TBitmap.Create;
    
   MyChart.Canvas.ReferenceCanvas.Lock;
   BMP.Assign(c_Profil.TeeCreateBitmap(clnone, c_Profil.canvas.bounds, pfDevice, 0));
   MyChart.Canvas.ReferenceCanvas.Unlock;
   BMP.SaveToFile(fnBMP);
end;
Comment 2 SVogler 2021-05-07 03:08:06 EDT
 Solved by using this:

https://www.steema.com/support/viewtopic.php?p=30317

Var
   BMP:    TBitmap;
begin
   BMP := TBitmap.Create;
   with MyChart Do begin    
      Canvas.ReferenceCanvas.Lock;
      BMP.Assign(TeeCreateBitmap(clnone, canvas.bounds, pfDevice, 0));
      Canvas.ReferenceCanvas.Unlock;
   end;
   BMP.SaveToFile(fnBMP);
   BMP.Free;
end;
Comment 3 yeray alonso 2021-05-07 03:11:20 EDT
Created attachment 961 [details]
project from forums

I'm attaching here the project from the forums in case the link dies.

Also, I'm closing this issue since the code suggested seems to solve the problem.