ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Reset TImageEnVect properties of next object
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

pascal

Germany
1 Posts

Posted - May 30 2018 :  07:59:34  Show Profile  Reply
What would be the best way to reset all properties for the TImageEnVect IEV_NEXT_INSERTED_OBJECT without adding a new object?

I know of AddNewObject with the bDefaultProps parameter set to True. But this seems to reset the properties for next object, not the added object.

For example:

procedure test;
var hobj: Integer;
begin
  // Preparing new object:
  ObjPenWidth[IEV_NEXT_INSERTED_OBJECT] := 5;

  // Want to cancel operation. All I can think of
  // to discard previous preparation is:
  hobj := AddNewObject(True);
  RemoveObject(hobj);

  // To paint some standard object after that
  // without caring about ALL properties:
  ObjKind[IEV_NEXT_INSERTED_OBJECT] := iekBOX;
  ObjPenColor[IEV_NEXT_INSERTED_OBJECT] := clGreen;
  AddNewObject(True);
end;

xequte

38175 Posts

Posted - Jun 10 2018 :  19:58:53  Show Profile  Reply
Hi

I'm afraid there is not a built-in method for that, but you can create a new method based on TImageEnVect.SetDefaultObjectProperties (in ievect.pas).

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: