Interfaz IHPDFDecodedBitmapHandle

Proporciona acceso inmutable con conteo de referencias al almacenamiento de imágenes decodificadas compartido por el cache de imágenes cargadas, los waiters de singleflight y los renderers

Declaración

IHPDFDecodedBitmapHandle = interface
  function GetWidth: Integer;
  function GetHeight: Integer;
  function GetPixelFormat: TPixelFormat;
  function GetByteSize: Int64;
  function CreateBitmapCopy: TBitmap;
  procedure StretchDraw(DestinationDC: HDC;
    const Destination: TRect; StretchMode: Integer);
end;

Ownership

La interfaz mantiene vivo el almacenamiento decodificado de forma independiente de la expulsión del cache, la invalidación del cache y la destrucción del documento

El conteo de referencias es thread-safe y el TBitmap mutable compartido nunca se expone a los llamadores

Dibujo y copias

StretchDraw dibuja desde el almacenamiento compartido inmutable sin materializar un bitmap propio del llamador y serializa el acceso al recurso GDI subyacente

CreateBitmapCopy devuelve un TBitmap aislado propiedad del llamador para las APIs que requieren píxeles mutables

APIs relacionadas

THotPDF.AcquireLoadedImageStream · THotPDF.AcquireLoadedImageRegionAtResolution · Cache de decodificación de imágenes cargadas por shards