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
 IEvolution .NET IEViewer Paint event drawing
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Deeron

67 Posts

Posted - Sep 27 2021 :  06:17:47  Show Profile  Reply
Hi,

Is it possible to draw through the paint event in the IEViewer visual control?
It does not work for me (IEVolution .NET 8.0.0).


For example, drawing a plain rectangle:



        private void Form1_Load(object sender, EventArgs e)
        {
            ieViewer1.Image.LoadImage(@"C:\sample.jpg");
        }

        private void ieViewer1_Paint(object sender, PaintEventArgs e)
        {
            e.Graphics.PageUnit = GraphicsUnit.Pixel;
            // Create pen.
            Pen blackPen = new Pen(Color.Black, 2f);

            // Create rectangle.
            Rectangle rect = new Rectangle(0, 0, 100, 100);

            // Draw rectangle to screen.
            e.Graphics.DrawRectangle(blackPen, rect);
        }


The same code works for e.g. a picturebox.


xequte

38222 Posts

Posted - Sep 27 2021 :  20:59:07  Show Profile  Reply
Hi

Unfortunately there is not good support in IEvolution for custom drawing at this stage.

You might want to add a layer instead (e.g. a rectangular shape):

https://www.imageen.com/ievolutionhelp/html/c46197c9-b2cb-e55a-3136-823005478089.htm


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