THotPDF.RegisterLabColorSpace Metodo THotPDF.RegisterLabColorSpace Metodo THotPDF.RegisterLabColorSpace Metodo THotPDF.RegisterLabColorSpace Metodo THotPDF.RegisterLabColorSpace Metodo THotPDF.RegisterLabColorSpace Metodo THotPDF.RegisterLabColorSpace Metodo THotPDF.RegisterLabColorSpace Metodo THotPDF.RegisterLabColorSpace Metodo

 

THotPDF.RegisterLabColorSpace

THotPDF

 

Top

Registers a PDF 1.3 CIELab color space (ISO 32000-1 8.6.5.3) under an auto-generated resource name (Lab1, Lab2, ...). Use the returned name with THPDFPage.SetFillColorSpace / SetStrokeColorSpace seguiti da SetFillColor / SetStrokeColor passando le tre componenti L*a*b*.

 

Sintassi Delphi:

function RegisterLabColorSpace(WhitePointX, WhitePointY, WhitePointZ: Single; RangeAMin, RangeAMax, RangeBMin, RangeBMax: Single): AnsiString;

 

Sintassi C++:

AnsiString RegisterLabColorSpace(float WhitePointX, float WhitePointY, float WhitePointZ, float RangeAMin, float RangeAMax, float RangeBMin, float RangeBMax);

 

Descrizione

Lo spazio colore CIELab descrive i colori indipendentemente da qualsiasi dispositivo di visualizzazione o stampa: L* esprime la luminosità in [0..100], a* l'asse verde/rosso, b* l'asse blu/giallo (tipicamente [-128..127]). I viewer PDF conformi convertono L*a*b* al colore del dispositivo usando il WhitePoint illuminante. Illuminanti comuni:

 

D50 - ICC print standard. WhitePoint = [0.9505, 1.0, 1.089].

D65 - sRGB / display standard. WhitePoint = [0.95047, 1.0, 1.08883].

 

WhitePoint Y must equal 1.0 per spec table 64; X and Z must be positive. Passing all four Range parameters as zero falls back to the spec's implicit default [-100 100 -100 100]; pass any non-zero combination to override.

 

Valore restituito: an auto-generated resource name (Lab1, Lab2, ...). Returns the empty string when StrictVersionLock è attivo e la Version is below PDF 1.3 (otherwise the version is auto-bumped to 1.3).

 

Esempio di codice

// Register a D50 Lab space for print, paint a magenta swatch
var
  CSName: AnsiString;
begin
  HPDF.Version := pdf14;
  HPDF.BeginDoc;
  CSName := HPDF.RegisterLabColorSpace(
    0.9505, 1.0, 1.089,        // D50 WhitePoint
    -128, 127, -128, 127);     // standard a* and b* range
  HPDF.CurrentPage.SetFillColorSpace(CSName);
  HPDF.CurrentPage.SetFillColor([50.0, 60.0, -50.0]);  // L* a* b*
  HPDF.CurrentPage.Rectangle(60, 60, 200, 100);
  HPDF.CurrentPage.Fill;
  HPDF.EndDoc;
end;

 

Vedi anche:

Version, Compression, Supporto dei filtri PDF