Page 1 of 1

Stretch inserted picture

Posted: Wed Feb 26, 2014 10:11 am
by starhu
Hello,

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

Thank you

Posted: Wed Feb 26, 2014 4:00 pm
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;