TXLSXImages is the worksheet image collection exposed by TXLSXWorksheet.Images and each TXLSXImage carries image bytes, format and drawing anchor geometry
Declarations
type
TXLSXImageFillMode = (xlsxImageFillStretch, xlsxImageFillTile);
TXLSXImage = class
procedure Assign(Source: TXLSXImage);
procedure Scale(APercent: Double; AKeepAspect: Boolean = True);
procedure ClearPreservedXml;
property Row, Col: Integer;
property WidthEMU, HeightEMU: Integer;
property WidthInch, HeightInch: Double;
property WidthCM, HeightCM: Double;
property WidthPt, HeightPt: Double;
property Format: TXLSXImageFormat;
property Data: AnsiString;
property AnchorType: TXLSXAnchorEditAs;
property CropLeft, CropTop, CropRight, CropBottom: Double;
property Transparency, Brightness, Contrast: Double;
property Rotation: Double;
property AltText: WideString;
property AltTextTitle: WideString;
property FillMode: TXLSXImageFillMode;
property HasPreservedXml: Boolean;
end;
TXLSXImages = class
function Add: TXLSXImage; overload;
function Add(Source: TXLSXImage): Integer; overload;
function FindAt(ARow, ACol: Integer): TXLSXImage;
function DeleteAt(ARow, ACol: Integer): Boolean;
function DeleteInRange(ARow1, ACol1, ARow2, ACol2: Integer): Integer;
property Items[Index: Integer]: TXLSXImage; default;
end;
Key üyeleri
| Row and Col | One-based top-left anchor cell |
| WidthEMU and HeightEMU | Native drawing dimensions in English Metric Units |
| WidthInch, WidthCM and WidthPt | Convenience geometry views that update the underlying EMU dimensions |
| AnchorType | Selects move and size with cells, move only, or absolute drawing behaviour |
| CropLeft, CropTop, CropRight and CropBottom | Kaynak görüntü kırpma kenarları, 0 ile 100 arası yüzdeler olarak |
| Transparency | 0 ile 100 percent arası düzgün görüntü saydamlığı |
| Brightness and Contrast | -100 ile 100 percent arası parlaklık ayarları |
| Rotation | Derece cinsinden saat yönünde şekil döndürme, -360 ile 360 aralığına kırpılır |
| AltText | Resmin erişilebilirlik alt metni; ekran okuyucular ve yardımcı araçlar tarafından tüketilir |
| AltTextTitle | Resmin erişilebilir başlığı |
| FillMode | Resmi bir kez uzatır veya şeklin üzerine döşer |
| HasPreservedXml and ClearPreservedXml | Tek bir resim için düzenlemeye güvenli içe aktarılmış DrawingML'i inceler veya atar |
| FindAt | Finds the image anchored at a one-based cell coordinate |
Örnek
var Image: TXLSXImage;
begin
Image := Sheet.Images.Add;
Image.Row := 2;
Image.Col := 4;
Image.Data := PngBytes;
Image.Format := xlsxImagePng;
Image.WidthCM := 6;
Image.AnchorType := xaOneCell;
Image.CropLeft := 12.5;
Image.Transparency := 20;
Image.Brightness := 10;
Image.Contrast := -5;
Image.FillMode := xlsxImageFillStretch;
Image.Rotation := 15;
end;
Ayrıca bkz.