THPDFPage.SetTextRenderingMode

THPDFPage

 

Üst  Önceki  Sonraki

Determines text rendering mode.

 

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

 

Delphi sözdizimi:

procedure SetTextRenderingMode( Mode: TPDFTextRenderingMode );

 

C++ sözdizimi:

void __fastcall SetTextRenderingMode ( TPDFTextRenderingMode Mode );

 

Açıklama:

Determines whether showing text causes glyph outlines to be stroked, filled, used as a clipping boundary, or some combination of the three.

 

Kod Örneği

program TextRender;
{$APPTYPE CONSOLE}
uses
    SysUtils, Graphics, Classes, HPDFDoc;
var
    HPDF: THotPDF;
begin
    HPDF := THotPDF.Create(nil);
    try
        HPDF.AutoLaunch := true;                                      // PDF dosyası otomatik olarak gösterilir
        HPDF.FileName := '.\TextRender.pdf';                          // PDF dosya adını ayarla
        HPDF.BeginDoc;                                                // PDF dosyası oluştur

        HPDF.CurrentPage.SetRGBStrokeColor( clRed );                  // Kontur rengini ayarla
        HPDF.CurrentPage.SetRGBFillColor( clYellow );                 // Dolgu rengini ayarla
        HPDF.CurrentPage.SetTextRenderingMode( trFillThenStroke );    // Set fill and stroke rendering mode
        HPDF.CurrentPage.TextOut( 10, 10, 0, 'Fill and stroke text'); // Print text
        HPDF.EndDoc;                                                  // PDF dosyasını kapat
    finally
        HPDF.Free;
    end;
end.

 

Value                Meaning


 

trFill

 

Fill text.

 

Fill text rendering diagram

 

trStroke

 

Metni konturla

 

Stroke text rendering diagram

 

trFillThenStroke

 

Doldur, sonra metni konturla

 

Fill and stroke text rendering diagram

 

trInvisible

 

 

Ne doldur ne de konturla (görünmez)

 

 

 

trFillClipping

 

Kırpma için metni doldurun ve yola ekleyin.

 

Fill text and add to path rendering diagram

 

trStrokeClipping

 

Kırpma için metni konturlayın ve yola ekleyin.

 

Stroke text and add to path rendering diagram

 

trFillStrokeClipping

 

Metni doldurun, ardından kontur çizin ve kırpma için yola ekleyin

 

Fill and stroke text rendering with path addition diagram

 

trClipping

 

Kırpma için metni yola ekle

 

Stroke text clipping rendering diagram