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
 ImageEnVect Adjust Bitmap Height and Add Memo Text
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

andyhill

Australia
161 Posts

Posted - Mar 05 2016 :  18:20:31  Show Profile  Reply
Hi my code below fails, any ideas ?


  ie:= TImageEnVect.Create(nil);
  try
    ImageEnVect1.AssignSelTo(ie);
    ie.IEBitmap.Height:= ie.IEBitmap.Height + 200; // All Good so far
    ie.ObjKind[IEV_NEXT_INSERTED_OBJECT]:= iekMemo;
    ie.ObjText[IEV_NEXT_INSERTED_OBJECT]:= Memo1.Text;
    ie.AddNewObject();
    ie.AlphaChannel.Fill(0);
    ie.CopyObjectsToBack(true, true);
    ie.RemoveAllObjects();
    ie.Update;
    ie.IO.DoPrintPreviewDialog(iedtMaxi);
  finally
    ie.Free();
  end;


Andy

xequte

39115 Posts

Posted - Mar 05 2016 :  21:09:26  Show Profile  Reply
Hi Andy

Fails in what way? The memo is not printed?


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

andyhill

Australia
161 Posts

Posted - Mar 07 2016 :  13:01:24  Show Profile  Reply
Sorry for the lack of info (brain drain).

I should have said: "How do I size and position the memo object within the bitmap" ?

Andy
Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 07 2016 :  13:54:19  Show Profile  Reply
ImageEnVect1.ObjLeft [IEV_NEXT_INSERTED_OBJECT] := 10;
ImageEnVect1.ObjTop [IEV_NEXT_INSERTED_OBJECT] := 10;
ImageEnVect1.ObjWidth [IEV_NEXT_INSERTED_OBJECT] := 50;
ImageEnVect1.ObjHeight[IEV_NEXT_INSERTED_OBJECT] := 50;


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

andyhill

Australia
161 Posts

Posted - Mar 08 2016 :  21:19:32  Show Profile  Reply
How do I get my text out (memo in this case) to appear well defined without lots of color noise on the ie.IEBitmap ?

Andy
Go to Top of Page

xequte

39115 Posts

Posted - Mar 08 2016 :  21:58:10  Show Profile  Reply
Hi Andy

Are you saving to JPEG? Try using a lossless format such as PNG.

If that is not what you mean, please attach an image.



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

andyhill

Australia
161 Posts

Posted - Mar 10 2016 :  15:18:42  Show Profile  Reply
I have only ever done Quick Replys up to this point so never saw the Attach Option.



Andy
Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 10 2016 :  17:52:50  Show Profile  Reply
I do not see what you do. The image has a white background with pure black text here.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

andyhill

Australia
161 Posts

Posted - Mar 11 2016 :  00:32:29  Show Profile  Reply
Here is the ImageEnVect1 bitmap



  ImageEnVect1.Proc.SaveUndo();
  ImageEnVect1.CopyObjectsToBack(True, True);
  ImageEnVect1.SelectionBase:= iesbClientArea;
  ImageEnVect1.Select(0, 0, ImageEnVect1.ExtentX, ImageEnVect1.ExtentY);
  ie:= TImageEnVect.Create(nil);
  try
    ImageEnVect1.AssignSelTo(ie);
    h:= ie.IEBitmap.Height;
    w:= ie.IEBitmap.Width;
    ie.IEBitmap.Height:= h + 245;
    ie.ObjKind[IEV_NEXT_INSERTED_OBJECT]:= iekMemo;
    ie.ObjLeft[IEV_NEXT_INSERTED_OBJECT]:= 5;
    ie.ObjTop[IEV_NEXT_INSERTED_OBJECT]:= h+10;
    ie.ObjWidth[IEV_NEXT_INSERTED_OBJECT]:= w-10;
    ie.ObjHeight[IEV_NEXT_INSERTED_OBJECT]:= 233;
    ie.ObjPenColor[IEV_NEXT_INSERTED_OBJECT]:= clBlack;
    ie.ObjFontHeight[IEV_NEXT_INSERTED_OBJECT]:= 8;
    ie.ObjAntialias:= False;
    ie.ObjText[IEV_NEXT_INSERTED_OBJECT]:= Memo1.Text;
    ie.AddNewObject();
    ie.CopyObjectsToBack(False, False);
    ie.RemoveAllObjects();
    ie.Update;
    ie.IO.DoPrintPreviewDialog(iedtMaxi);
  finally
    ie.Free();
  end;
  ImageEnVect1.Proc.Undo();
  ImageEnVect1.Proc.ClearUndo;
  ImageEnVect1.DeSelect;


Andy
Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 11 2016 :  10:40:38  Show Profile  Reply
I created a simple demo that you can download here that shows clear memo objects and text with your background image.
attach/w2m/201631110327_ImageEnVectMemo.zip
9215.34 KB



Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

andyhill

Australia
161 Posts

Posted - Mar 13 2016 :  15:21:14  Show Profile  Reply
Bill, I extended the height of the image so that the text would not print over the image.

You have printed over the image.

Andy
Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 13 2016 :  15:32:34  Show Profile  Reply
Even if you add a border to the image my demo still functions as you would expect it to:


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: