PDFium Component Docs

RenderTile 메서드

이 API 항목은 식별자, 시그니처, 코드 블록, PDF 용어를 원래 형태로 유지합니다.
컴포넌트: TPdf  ·  유닛: PDFium
페이지의 직사각형 영역을 새 비트맵으로 렌더링합니다. 반환된 비트맵은 직접 해제해야 합니다

구문

function RenderTile(Left, Top, Width, Height, PageWidth, PageHeight: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []; Color: TColor = clWhite): TBitmap;

Left, Top정수. 지정한 확대 수준에서 전체 페이지를 기준으로 렌더링할 타일 영역의 왼쪽 위 모서리, 픽셀 단위
Width, Height정수. 타일의 크기, 픽셀 단위. 반환되는 비트맵은 이 크기를 갖습니다
PageWidth, PageHeight정수. 원하는 확대 수준에서의 전체 페이지 크기, 픽셀 단위. 이 값은 페이지를 렌더링할 배율을 결정합니다
RotationTRotation. Display rotation applied to the page: ro0 (default), ro90, ro180, or ro270.
OptionsTRenderOptions. A set of TRenderOption flags controlling rendering quality and behavior.
ColorTColor. Background fill color for the bitmap before rendering. Defaults to clWhite.

 

procedure RenderTile(Bitmap: TBitmap; Left, Top, Width, Height, PageWidth, PageHeight: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []; Color: TColor = clWhite);

BitmapTBitmap. 타일을 렌더링할 기존 TBitmap. 이 비트맵을 생성하고 해제하는 책임은 호출자에게 있음
Left, Top정수. 지정한 확대 수준에서 전체 페이지를 기준으로 렌더링할 타일 영역의 왼쪽 위 모서리, 픽셀 단위
Width, Height정수. 타일의 크기, 픽셀 단위
PageWidth, PageHeight정수. 원하는 확대 수준에서의 전체 페이지 크기, 픽셀 단위
RotationTRotation. Display rotation applied to the page: ro0 (default), ro90, ro180, or ro270.
OptionsTRenderOptions. A set of TRenderOption flags controlling rendering quality and behavior.
ColorTColor. Background fill color applied to the bitmap before rendering. Defaults to clWhite.

설명

현재 페이지의 직사각형 타일을 렌더링합니다. 전체 페이지를 지정한 크기로 렌더링하는 RenderPage와 달리 RenderTile은 잘라낸 영역만 렌더링합니다. 이는 큰 페이지를 고해상도로 표시할 때 rendering the full page at once would consume too much memory.

PageWidth / PageHeight는 페이지의 총 렌더링 크기(즉 "zoom level")를 정의하고, Left / Top / Width / Height는 그 총 크기 안의 출력 창을 정의합니다

예제

// Render top-left 800x600 tile of a page scaled to 2000x2828
var Bmp: TBitmap;
Bmp := Pdf.RenderTile(0, 0, 800, 600, 2000, 2828);
try
  Image1.Picture.Assign(Bmp);
finally
  Bmp.Free;
end;

참고 항목

RenderPage, PageWidth