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
 Can this be done with ImageEn?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

AndyColmes

USA
351 Posts

Posted - Dec 13 2014 :  18:17:41  Show Profile  Reply
This web-based tool shows the different views of image formats:

http://xooyoozoo.github.io/yolo-octo-bugfixes/

Can this be done with ImageEn in any way?

Thanks

Andy

xequte

39140 Posts

Posted - Dec 14 2014 :  12:53:00  Show Profile  Reply
Hi

There is no built-in component for this, but you could do it fairly easily:
- Load an image
- Set its IO.Params and then save it to Stream A
- Load IEBitmap A from Stream A
- Sets it alternative IO.Params and then save it to Stream B
- Load IEBitmap B from Stream B
- Add a TPaintbox to a form. Store a fLastMouseX field. On mouse move, if X has changed from fLastMouseX then stretch draw IEBitmap A and IEBitmap B onto the respective sides of the TPaintbox, draw a dividing line and output your text


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

AndyColmes

USA
351 Posts

Posted - Dec 17 2014 :  20:14:20  Show Profile  Reply
Hi Nigel,

Thank you for the code steps. I am not too successful in drawing the dividing line on the TPaintBox. I would appreciate any code snippets to do this with the TPaintBox. I imagine it is done in the OnPaint event?

Thanks again.

Andy
Go to Top of Page

xequte

39140 Posts

Posted - Dec 18 2014 :  03:44:04  Show Profile  Reply
Hi Andy

On mouse move save the mouse position as a property, then invalidate the paint box. In your paint event use something such as:

With aPaintBox do
begin
  Canvas.Pen.Style := psDot;
  Canvas.Pen.Color := clBlack;
  Canvas.MoveTo( fMousePosX, 0 );
  Canvas.LineTo( fMousePosX, Height );
end;


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

AndyColmes

USA
351 Posts

Posted - Dec 22 2014 :  17:12:38  Show Profile  Reply
Hi Nigel,

Thanks very much for the code on the line drawing. Just a little snag on the stretch draw bit on my end. I can't seem to be able to draw the IEBitmap stream to the left or right of the line. I would appreciate if you could assist in giving a code snippet on this?

Thanks again and sorry for the inconvenience.

Andy
Go to Top of Page

xequte

39140 Posts

Posted - Dec 22 2014 :  22:04:35  Show Profile  Reply
Hi Andy

Please use:

http://www.imageen.com/help/TIEBitmap.RenderToCanvasWithAlpha.html

Code would be something like:

ALeftBitmap.RenderToCanvasWithAlpha( MyPaintBox.Canvas, 0, 0, iXpos, MyPaintBox.Height, 0, 0, iXpos * ScaleFactor, ALeftBitmap.Height, 255, rfFastLinear );

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

AndyColmes

USA
351 Posts

Posted - Jan 03 2015 :  03:09:51  Show Profile  Reply
Hi Nigel,

That worked flawlessly. Thank you very much.

Happy New Year!

Andy
Go to Top of Page

xequte

39140 Posts

Posted - Jan 04 2015 :  13:58:38  Show Profile  Reply
Hi Andy

You might be interested in adding it as a demo here:

http://www.imageen.com/ieforum/topic.asp?TOPIC_ID=1446



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: