Check if Image needs resizing on insert
Posted: Wed Apr 01, 2020 1:29 pm
In v17 of RichView I used the following code snipped to check if an image needs to be resized before inserting it.
With v18 it complains about "TRVStyle.GetAsPixelsEx" being undeclared (E1081). What would be the suggested way to do this in v18?
Code: Select all
function IsImageTooLarge(gr: TGraphic): Boolean;
begin
Result := (MaxImageSize>0) and
((gr.Width > TRVStyle.GetAsPixelsEx(MaxImageSize, rvstuPixels)) or
(gr.Height> TRVStyle.GetAsPixelsEx(MaxImageSize, rvstuPixels)));
end;