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
 5.2.0 CopyObjectsToBack issue

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
Niels Posted - Oct 22 2014 : 17:32:29
Hi, after the new update to 5.2.0 I have a problem with TImageEnVect and the method CopyObjectsToBack.
It worked before when I created images on the fly in a web service, therefore I won't have a parent window...
Please see the testcode below:

procedure TForm1.btn4Click(Sender: TObject);
var
   i: byte;
   Imv: TImageEnVect;
   TextObject: Integer;
   tmpFont: TFont;
   DataLabel, DataValue: String;
begin
   Imv := TImageEnVect.Create(nil);
   TRY
      tmpFont := TFont.Create;
      tmpFont.Color := HexToTColor(MapTextColor);
      tmpFont.Size:= 15;
      tmpFont.Name:= 'Calibri';
      tmpFont.Style := [fsBold];
      Imv.IO.LoadFromURL(MapTemplate);
      TextObject := Imv.AddNewObject(iekMEMO, Rect(25, 25, 800, 100), HexToTColor(MapTextColor));
      Imv.ObjFontLocked[TextObject] := true;
      Imv.ObjText[TextObject] := AnsiString('Title');
      Imv.SetObjFont(TextObject, tmpFont);
      Imv.ObjMemoBorderStyle[TextObject] := psClear;
      Imv.ObjMemoCharsBrushStyle[TextObject] := bsClear;
      Imv.ObjBrushStyle[TextObject] := bsClear;
      tmpFont.Size:= 13;
      DataLabel := uppercase('NSW');
      DataValue := '1%';
      TextObject := Imv.AddNewObject(iekMEMO, Rect(760, 395, 820, 425), HexToTColor(MapTextColor));
      Imv.ObjText[TextObject] := AnsiString(DataValue);
      Imv.SetObjFont(TextObject, tmpFont);
      Imv.ObjMemoBorderStyle[TextObject] := psClear;
      Imv.ObjMemoCharsBrushStyle[TextObject] := bsClear;
      Imv.ObjBrushStyle[TextObject] := bsClear;
      Imv.ObjTextAlign[TextObject] := iejCenter;
      Imv.CopyObjectToBack(TextObject, True, true); // Here it crashes
      Imv.RemoveAllObjects;
      Imv.IO.SaveToFilePNG('c:\temp\test.png');
   FINALLY
      tmpFont.Free;
      Imv.free;
   END;
end;


It works when I assign a parent window to Imv after I create it!

Imv.ParentWindow := Form1.Handle;


But this is no option for me because it has to run in a web service without parent vcl windows. It worked in the previous version, so something must have changed or is there a work around?

3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Feb 20 2015 : 01:41:49
Hi

Yes, please email us for an update.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Niels Posted - Feb 19 2015 : 17:44:32
Has the investigation come up with a solution.
Our project needs to get ported to XE7 but we can't and are waiting for a fix/solution/new version?
xequte Posted - Oct 28 2014 : 00:31:14
Hi

Thanks for the report. We are currently investigating a solution.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com