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
 5.2.0 CopyObjectsToBack issue
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Niels

Australia
10 Posts

Posted - Oct 22 2014 :  17:32:29  Show Profile  Reply
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?

xequte

38611 Posts

Posted - Oct 28 2014 :  00:31:14  Show Profile  Reply
Hi

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



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

Niels

Australia
10 Posts

Posted - Feb 19 2015 :  17:44:32  Show Profile  Reply
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?
Go to Top of Page

xequte

38611 Posts

Posted - Feb 20 2015 :  01:41:49  Show Profile  Reply
Hi

Yes, please email us for an update.

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