|Top Previous Next|
Occurs when TRichView saves image to HTML file or stream.
TRVSaveImageEvent2 = procedure (Sender: TCustomRichView;
Graphic: TGraphic; SaveFormat: TRVSaveFormat;
const Path, ImagePrefix: String;
var ImageSaveNo: Integer; var Location: String;
var DoDefault: Boolean) of object;
property OnSaveImage2: TRVSaveImageEvent2;
(introduced in version 1.8; "hidden" parameters are added in version 14)
This event is alternative to OnHTMLSaveImage. It is more easy to use, because the image is available in the Graphic parameter (in OnHTMLSaveImage, you need to extract image from the item or RVData yourself). Besides, this event has ImagePrefix and ImageSaveNo parameters, so you do not need to store them in global variables.
OnSaveImage2 is not called if:
▪DoDefault parameter of OnHTMLSaveImage was set to False for this image.
Graphic – image to save.
SaveFormat is equal to rvsfHTML.
ImageSaveNo – value that you can use to create unique file names (see GetNextFileName method in the description of OnHTMLSaveImage).
"Hidden" input parameters:
Sender.Style.ItemNo – index of this item inside Sender.Style.RVData. If this event is called for background image (document or cell), ItemNo=-1.
Location – set this parameter to file name of image where you saved it. This string will be inserted in HTML file.
DoDefault – set to False if you saved this image yourself. Otherwise, the default image saving procedure will be called.
See also events:
TRichView © trichview.com