|
THotPDF.AddImageWithSMask
|
傳回頂部 上一頁 下一頁 |
|
Adds a color image XObject together with a PDF 1.4 soft-mask image XObject (ISO 32000-1 8.9.5.4) so the resulting picture carries full per-pixel transparency instead of the binary on/off limit of the legacy 加入 color image XObject 與 PDF 1.4 soft-mask image XObject (ISO 32000-1 8.9.5.4),使產生的圖片帶有完整 per-pixel transparency,而不是舊式 /ImageMask path 的二元開關限制
Delphi 語法: function AddImageWithSMask(Width, Height: Integer; const RGB: TBytes; const Alpha: TBytes): Integer; function AddImageWithSMask32(Bitmap32: TBitmap): Integer;
C++ 語法: __property int AddImageWithSMask(int Width, int Height, const TBytes& RGB, const TBytes& Alpha); __property int AddImageWithSMask32(TBitmap* Bitmap32);
說明 傳回值: 與 AddImage 傳回值相同的 XImages index;請將它傳給 THPDFPage.ShowImage 以將圖片放置在頁面上。當 StrictVersionLock 啟用且目前 Version 低於 PDF 1.4 時傳回 -1;否則 version 會自動提升到 1.4
AddImageWithSMask(Width, Height, RGB, Alpha) - -
AddImageWithSMask(Width, Height, RGB, Alpha) - - -
AddImageWithSMask32(Bitmap32) 這是常見「我有一張帶 alpha 的 PNG」workflow 的便利 overload。TBitmap 必須具有 PixelFormat = pf32bit;HotPDF 會直接讀取 BGRA ScanLine rows,將其重排為 color plane 的 R G B,並在委派給 raw AddImageWithSMask entry point 前,將 A byte 複製到 alpha plane
傳回值:XImages 中的 index,與 AddImage 傳回的值相同;請將它傳給 THPDFPage.ShowImage 以在頁面放置圖片。當 StrictVersionLock 開啟且 active Version 低於 PDF 1.4 時傳回 -1;否則 version 會自動提升到 1.4
Code Example
請參閱 AddImage, THPDFPage.ShowImage, Version, PDF 篩選器支援
|