THPDFPage.SetTextRenderingMode

THPDFPage

 

Topo  Anterior  Próxima

Determina o tmodo de renderização estendido.

 

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

 

Sintaxe Delphi:

procedure SetTextRenderingMode( Mode: TPDFTextRenderingMode );

 

Sintaxe C++:

void __fastcall SetTextRenderingMode ( TPDFTextRenderingMode Mode );

 

Description:

Determina se a exibição de texto faz os contornos dos glifos serem traçados, preenchidos, usados como fronteira de clipping ou alguma combinação dos três.

 

Exemplo de código

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.

 

Valor                Significado


 

trFill

 

Fill text.

 

Fill text rendering diagram

 

trStroke

 

Stroke text.

 

Stroke text rendering diagram

 

trFillThenStroke

 

Preenche e depois traça o texto.

 

Fill and stroke text rendering diagram

 

trInvisible

 

 

Nem preenche nem traça o texto (invisível).

 

 

 

trFillClipping

 

Preenche o texto e adiciona ao path para clipping.

 

Fill text and add to path rendering diagram

 

trStrokeClipping

 

Traça o texto e adiciona ao path para clipping.

 

Stroke text and add to path rendering diagram

 

trFillStrokeClipping

 

Preenche, depois traça o texto e adiciona ao path para clipping.

 

Fill and stroke text rendering with path addition diagram

 

trClipping

 

Adiciona o texto ao path para clipping.

 

Stroke text clipping rendering diagram