|
Valore restituito: un nome color-space generato automaticamente (Sep1, Sep2, ...). La voce Separation e condivisa con il registro RegisterSeparation v2.45.0, quindi i nomi incrementano monotonamente tra le due varianti. Restituisce una stringa vuota quando StrictVersionLock e attivo e la Version attiva e inferiore a PDF 1.3 (altrimenti la versione documento viene aggiornata automaticamente a 1.3)
Example di codice
// Register a 'HeatLUT' Separation over DeviceRGB whose tint -> RGB
// curve is a 256-sample blue -> green -> red heatmap
var
CSName: AnsiString;
Samples: array[0..767] of byte; // 256 * 3 RGB
I: Integer;
T: Single;
begin
HPDF.BeginDoc;
for I := 0 to 255 do
begin
T := I / 255.0;
if T < 0.5 then
begin
Samples[I*3 + 0] := 0;
Samples[I*3 + 1] := byte(Round(2.0 * T * 255.0));
Samples[I*3 + 2] := byte(Round((1.0 - 2.0*T) * 255.0));
end
else
begin
Samples[I*3 + 0] := byte(Round(2.0 * (T - 0.5) * 255.0));
Samples[I*3 + 1] := byte(Round((1.0 - 2.0*(T - 0.5)) * 255.0));
Samples[I*3 + 2] := 0;
end;
end;
CSName := HPDF.RegisterSeparationLUT('HeatLUT', 'DeviceRGB', Samples);
HPDF.CurrentPage.SetFillColorSpace(CSName);
HPDF.CurrentPage.SetFillColor([0.5]); // midpoint -> pure green
HPDF.CurrentPage.Rectangle(100, 100, 40, 40);
HPDF.CurrentPage.Fill;
HPDF.EndDoc;
end;
Vedi anche
RegisterSeparation, RegisterSampledFunction, RegisterDeviceN, Version, Supporto dei filtri PDF
|