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
 How can I get the image of ImageEnView screen display part?

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
foxdingding Posted - Jul 06 2022 : 01:58:14
How can I get the image of ImageEnView screen display part?

Like this Code:


Var
         bmpscreen:Tbitmap;
         FullscreenCanvas:TCanvas;
         dc:HDC;
         sourceRect, destRect: TRect;
         a,b,c,d:Integer;

Begin

         a:=0;
         b:=0;
         c:=ImageEnView1.Width;
         d:=ImageEnView1.Height;

         dc:=getdc(Self.ImageEnView1.Handle);
         fullscreencanvas:=Tcanvas.Create;
         bmpscreen:=Tbitmap.create;
Try	


            fullscreencanvas.Handle:=dc;

            bmpscreen.Width :=c-a;
            bmpscreen.Height :=d-b;
            sourcerect:=rect(0,0,c-a ,d-b );
            destrect:= rect(a,b,c,d);

            bmpscreen.Canvas.CopyRect(sourcerect,fullscreenCanvas,destrect);
            ImageEnView2.IEBitmap.CopyFromTBitmap(bmpscreen);
            ImageEnView2.Update;
       Finally
            bmpscreen.Free;
            FullscreenCanvas.Free;
            ReleaseDC(Self.ImageEnView1.Handle, DC);
         End;



4   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jul 07 2022 : 23:53:24
Yes, you are right. We have added a TIEBitmap overload to the current beta so you can call like:

ImageEnView1.DrawTo( ImageEnView2.IEBitmap );
ImageEnView2.Update();


Nigel
Xequte Software
www.imageen.com
foxdingding Posted - Jul 07 2022 : 02:05:26
I think it should be this


Example
// draw in ImageEn2 all what is displayed in ImageEnView1
ImageEnView1.DrawTo(ImageEnView2.IEBitmap.Canvas);
ImageEnView2.Update;


Description
Returns the height of the area used to show the current image (i.e. the height of the image as it appears onscreen).
If scrollbars are visible, only the visible height will be returned.



Example

// Copy the actual view of ImageEnView1 as the current image of ImageEnView2
ImageEnView2.IEBitmap.Width := ImageEnView1.ExtentX;
ImageEnView2.IEBitmap.Height := ImageEnView1.ExtentY;
ImageEnView1.DrawTo(ImageEnView2.IEBitmap.Canvas);

xequte Posted - Jul 07 2022 : 00:38:26
Hi

If you are looking for the displayed area of the image please see:

https://www.imageen.com/help/TImageEnView.VisibleBitmapRect.html

There are examples there for drawing it to another ImageEnView.


Nigel
Xequte Software
www.imageen.com
foxdingding Posted - Jul 06 2022 : 02:01:03
I don't know whether I can or can' t?


            ImageEnView2.IEBitmap.Width := ImageEnView1.ExtentX;
            ImageEnView2.IEBitmap.Height := ImageEnView1.ExtentY;

            ImageEnView1.DrawTo(ImageEnView2.IEBitmap.Canvas);
            ImageEnView2.Update;