THPDFPage.SetTextRenderingMode

THPDFPage

 

Inizio  Precedente  Successivo

Determina la modalità di rendering del testo.

 

TPDFTextRenderingMode = (trFill, trStroke, trFillThenStroke, trInvisible, trFillClipping, trStrokeClipping, trFillStrokeClipping, trClipping);

 

Sintassi Delphi:

procedure SetTextRenderingMode( Mode: TPDFTextRenderingMode );

 

Sintassi C++:

void __fastcall SetTextRenderingMode ( TPDFTextRenderingMode Mode );

 

Descrizione:

Determina se la visualizzazione del testo provoca il tracciamento dei contorni dei glifi, il riempimento, l'uso come confine di ritaglio o una combinazione delle tre possibilità.

 

Example di codice

program TextRender;
{$APPTYPE CONSOLE}
uses
    SysUtils, Graphics, Classes, HPDFDoc;
var
    HPDF: THotPDF;
begin
    HPDF := THotPDF.Create(nil);
    try
        HPDF.AutoLaunch := true;                                      // PDF file will be shown automatically
        HPDF.FileName := '.\TextRender.pdf';                          // Set PDF filename
        HPDF.BeginDoc;                                                // Create PDF file

        HPDF.CurrentPage.SetRGBStrokeColor( clRed );                  // Set stroke color
        HPDF.CurrentPage.SetRGBFillColor( clYellow );                 // Set fill color
        HPDF.CurrentPage.SetTextRenderingMode( trFillThenStroke );    // Set fill and stroke rendering mode
        HPDF.CurrentPage.TextOut( 10, 10, 0, 'Fill and stroke text'); // Print text
        HPDF.EndDoc;                                                  // Close PDF file
    finally
        HPDF.Free;
    end;
end.

 

Significato del valore


 

trFill

 

Riempie il testo

 

Fill text rendering diagram

 

trStroke

 

Traccia il testo

 

Stroke text rendering diagram

 

trFillThenStroke

 

Riempie, poi traccia il testo

 

Fill and stroke text rendering diagram

 

trInvisible

 

 

Non riempie né traccia il testo (invisibile)

 

 

 

trFillClipping

 

Riempie il testo e lo aggiunge al percorso per il ritaglio

 

Fill text and add to path rendering diagram

 

trStrokeClipping

 

Traccia il testo e lo aggiunge al percorso per il ritaglio

 

Stroke text and add to path rendering diagram

 

trFillStrokeClipping

 

Riempie, poi traccia il testo e lo aggiunge al percorso per il ritaglio

 

Fill and stroke text rendering with path addition diagram

 

trClipping

 

Aggiunge il testo al percorso per il ritaglio

 

Stroke text clipping rendering diagram