jkwall Posted May 13, 2009 Share Posted May 13, 2009 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. 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 Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted May 13, 2009 Share Posted May 13, 2009 Try drawing on a graphics object attached to a bitmap and then copying it to a surface. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted May 14, 2009 Share Posted May 14, 2009 You have to clip to your current render rect. There is an example on this page (way down at the bottom in the "Font Names" section): http://www.boltbait.com/pdn/codelab/hel ... ments.html Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.