The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



SuppressPaint


Unit:SDL_plot3d
Class:TPlot3D
Declaration:property SuppressPaint: boolean;

Changing any element of the data matrix GridMat will trigger the repaint process. This considerably slows down the creation of the 3D surface. It is therefore recommended to temporarily switch off repainting when a lot of cells are changed programmatically.

The example below shows how to deal with such situations. The 3D surface is loaded with data after switching off the repaint mechanism. When completed the repainting is enabled again (enabling the repainting automatically refreshes the report list display).

Example: How to temporarily switch off the repaint mechanism.
var
  i, j : longint;

begin
Plot3D1.SuppressPaint := true;
for i:=1 to Plot3D1.GridMat.NrOfColumns do
  for j:=1 to Plot3D1.GridMat.NrOfRows do
    Plot3D1.GridMat[i,j] := sin(0.1*i)*cos(0.03*j);
Plot3D1.SuppressPaint := false;
end;

Example: This property is used in the following example program (see http://www.lohninger.com/examples.html for downloading the code): interpol3d, plotit3d



Last Update: 2023-Dec-13