Stretch inserted picture

General TRichView support forum. Please post your questions here
Post Reply
starhu
Posts: 49
Joined: Fri Jan 17, 2014 6:33 pm

Stretch inserted picture

Post by starhu »

Hello,

When the user inserts a picture, can I stretch it by code, to be smaller?

Thank you
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Inserting the picture and stretching it to StretchX x StretchY:

Code: Select all

re.BeginUpdate; 
re.TopLevelEditor.BeginUndoGroup(rvutInsert); 
re.TopLevelEditor.SetUndoGroupMode(True); 
try 
  if re.InsertPicture(...) then begin 
    re.SetCurrentItemExtraIntProperty(rvepImageWidth, StretchX, True); 
    re.SetCurrentItemExtraIntProperty(rvepImageHeight, StretchY, True); 
  end; 
finally 
  re.TopLevelEditor.SetUndoGroupMode(False); 
  re.EndUpdate; 
end;
Post Reply