THPDFPage.SetTextRenderingMode

THPDFPage

 

맨 위  이전  다음

Determines text rendering mode.

 

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

 

Delphi 구문:

procedure SetTextRenderingMode( Mode: TPDFTextRenderingMode );

 

C++ 구문:

void __fastcall SetTextRenderingMode ( TPDFTextRenderingMode Mode );

 

Description:

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

 

Code Example

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.

 

Value                Meaning


 

trFill

 

텍스트를 채웁니다

 

Fill text rendering diagram

 

trStroke

 

텍스트를 스트로크합니다

 

Stroke text rendering diagram

 

trFillThenStroke

 

텍스트를 채운 다음 스트로크합니다

 

Fill and stroke text rendering diagram

 

trInvisible

 

 

텍스트를 채우지도 스트로크하지도 않습니다(보이지 않음)

 

 

 

trFillClipping

 

텍스트를 채우고 클리핑용 경로에 추가합니다

 

Fill text and add to path rendering diagram

 

trStrokeClipping

 

텍스트를 스트로크하고 클리핑용 경로에 추가합니다

 

Stroke text and add to path rendering diagram

 

trFillStrokeClipping

 

텍스트를 채운 다음 스트로크하고 클리핑용 경로에 추가합니다

 

Fill and stroke text rendering with path addition diagram

 

trClipping

 

텍스트를 클리핑용 경로에 추가합니다

 

Stroke text clipping rendering diagram