TCustom3DPaletteSeries.UsePalette
 
 
 

All Units  All Classes  Properties, Methods and Events  

TCustom3DPaletteSeries.UsePalette
TCustom3DPaletteSeries

property UsePalette: Boolean;

Unit
TeeSurfa

Description
Default False

The UsePalette property indicates that Surface polygons will be filled with a multi-color palette. The PaletteSteps property determines the number of entries in the palette. The RedFactor, GreenFactor and BlueFactor properties define the color proportion when creating the palette. The formula used to build colors is:

Procedure TSurfaceSeries.CreateDefaultPalette(NumSteps:Longint);
Const Delta=127.0;
var t:Longint;
tmp,Scale,ScaleValue:Double;
Begin
ClearPalette;
FPalette.Capacity:=NumSteps+1;
Scale:=pi/NumSteps;
ScaleValue:=(YValues.MaxValue-YValues.MinValue)/NumSteps;

for t:=1 to NumSteps do
begin
tmp:=Scale*t;
AddPalette(YValues.MinValue+ScaleValue*t, RGB( Trunc(Delta * (Sin(tmp/RedFactor)+1)) , Trunc(Delta * (Sin(tmp/GreenFactor)+1)), Trunc(Delta * (Cos(tmp/BlueFactor)+1))));
end;

end;



Send us Help Feedback. Copyright 1995-2013 © by Steema Software. All Rights Reserved.