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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Reset TImageEnVect properties of next object

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
pascal Posted - May 30 2018 : 07:59:34
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;
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jun 10 2018 : 19:58:53
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