Jump to content

Developing a Plugin using the Graphics Surface has Artifacts


Recommended Posts

I'm developing a plugin that is similar in style to CodeLab with a text editor to modify an Image.

I'm using GDI drawing methods and have been through a couple of iterations because of this.

First design creating problems during the Render method because of threading.

This is the second design that has a horrible preview but when it does a final render it works great.

Preview is also attached.

file.php?mode=view&id=4242&sid=d5fa219fe8a26ed6ddc8ba5208a88ae8

I just thought it could be related to my graphics Drivers. I've run this on two computers but they both have ATI FireGL Video Cards. So let me know if it works for you.

This is the code in my Render Method. The Project is included as an attachment which reproduces the issue exactly.

           dstArgs.Surface.CopySurface(srcArgs.Surface);
           Graphics g = new RenderArgs(dstArgs.Surface).Graphics;
           g.DrawLine(new Pen(Color.Black), new Point(10, 10), new Point(10, 100));
           g.DrawLine(new Pen(Color.Black), new Point(10, 100), new Point(100, 10));

Am I doing something wrong? Or is there a better way to do this.

RenderDemo.zip

29132_cc3e67d9afc385b479e79835671cbe8a

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...