PDFium Delphi Component Docs

TTileKey 레코드와 TPdfTileCache 클래스

유닛: PDFium

TTileKey

TTileKey.Create는 DocumentRevision, PageNumber, Zoom, Rotation, RenderOptions, TileLeft, TileTop, TileWidth, TileHeight를 안정적인 렌더 타일 키로 결합합니다

Equals는 모든 키 필드를 비교하며 마이크로 미만의 Zoom 차이는 허용합니다

TPdfTileCache methods

MethodDescription
Create(Capacity: Integer = 64)최소 한 타일 용량으로 한도 있는 캐시를 만듭니다
Create(Capacity: Integer; Governor: TPdfCacheGovernor)공유 바이트 예산에도 함께 참여하는 캐시를 만듭니다
Destroy캐시를 지우고 소유한 모든 비트맵을 해제합니다
Get(const Key: TTileKey): TBitmap소유권을 이전하지 않고 캐시된 비트맵을 반환하며 로컬과 공유 최근 사용 정보를 갱신합니다
Put(const Key: TTileKey; Bitmap: TBitmap)비트맵 소유권을 캐시로 이전하고 항목 용량과 공유 바이트 예산이 모두 허용할 때만 보유합니다
InvalidatePage(PageNumber: Integer)한 페이지의 모든 타일을 제거합니다
InvalidateRevision(DocumentRevision: Int64)지정된 문서 리비전에 속한 타일만 유지합니다
Clear캐시된 모든 비트맵과 거버너 토큰을 해제합니다

Properties

PropertyTypeDescription
CapacityInteger최대 타일 수
CountInteger현재 타일 수
StoredBytesInt64너비 × 높이 × 4바이트로 계산한 현재 비트맵 사용량
CacheGovernorTPdfCacheGovernor선택적 공유 거버너이며 할당 시 기존 항목을 먼저 지웁니다

Governor lifetime

캐시는 CacheGovernor를 결코 소유하지 않습니다

거버너는 캐시보다 오래 살아 있어야 하며, 그렇지 않으면 거버너를 해제하기 전에 속성을 nil로 설정해야 합니다

See Also

FPdfCache, TPdf cache governor, RenderTile