Delphi-Quellcode:
var
Index: Integer;
Layer: TCustomFilterLayer;
begin
Index := lbLayers.ItemIndex;
if Index <> - 1 then
begin
if lbLayers.Items.Objects[Index] is TCustomFilterLayer then
begin
Layer := lbLayers.Items.Objects[Index] as TCustomFilterLayer;
if Layer is TBrightnessAdjustmentLayer then
begin
Layer := Layer as TBrightnessAdjustmentLayer;
with TBrightnessLayerEditor.Create(Layer) do
begin
SetAmount(vtInteger, -100, 100, TBrightnessAdjustmentLayer(Layer).Amount); // Here is something wrong :(
// Here is ok
end;
end;
end;
end;
end;
So, I create some graphic tool with layers.
There is problem with this procedure: when - TBrightnessAdjustmentLayer(Layer).Amount is always 0 (default from Create()), also if is setup other value... Other parameters from TCustomFilterLayer are ok. Why and how to fix? Layer is display with correct setting.