Simon Brown Posted March 12, 2008 Share Posted March 12, 2008 I am trying to modify my CB plugin to work more by-the-book and I have been having some problems. I have managed to work out now precisely what I think the problem is but I don't know how to solve it. When FinishTokenUpdate() is called OnSetRenderInfo() is called but the data placed in dstArgs is not written to the canvas. Help will be appreciated. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted March 12, 2008 Share Posted March 12, 2008 You shouldn't be writing into dstArgs in OnSetRenderInfo(). Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Simon Brown Posted March 12, 2008 Author Share Posted March 12, 2008 You shouldn't be writing into dstArgs in OnSetRenderInfo(). I have now moved the same simple fill canvas with black rectangle test method that I have been using into Render() but still, it only works when it is called by default and further testing reveals that the length variable is only 1 when I call FinishTokenUpdate(). Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted March 12, 2008 Share Posted March 12, 2008 You'll have to publish your code here for us to figure anything out. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Simon Brown Posted March 12, 2008 Author Share Posted March 12, 2008 Attached is the source protected with a password which I will PM you. Edit: Downloaded by him and so removed. Quote Link to comment Share on other sites More sharing options...
pyrochild Posted March 12, 2008 Share Posted March 12, 2008 You are severely impairing your ability to be helped by only allowing one specific person to assist you. A far better approach would be to publicly display only the relevant parts of the code. You can leave out whatever parts you're trying to keep secret. In that way, a far greater number of people will able to help. Also, when distributing source code, you should delete the bin and obj folders. Those only contain files generated by the compiler. As such, any other compiler will just automatically make them again when compiling, so you don't need to distribute it and increase the filesize. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Simon Brown Posted March 12, 2008 Author Share Posted March 12, 2008 You are severely impairing your ability to be helped by only allowing one specific person to assist you.A far better approach would be to publicly display only the relevant parts of the code. You can leave out whatever parts you're trying to keep secret. In that way, a far greater number of people will able to help. There aren't any specific parts I want to keep secret - I just don't like releasing source code. If you like I will PM you the password. Quote Link to comment Share on other sites More sharing options...
pyrochild Posted March 13, 2008 Share Posted March 13, 2008 If you like I will PM you the password. Sure. I'll try to look at within a couple days. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
pyrochild Posted March 14, 2008 Share Posted March 14, 2008 Ok, I've made it work. What's more, I've provided code samples for making evenly spaced strokes. The sample implementation is left-click for continuous stroke, and right-click for 50px spacing. Obviously, if you decide to keep these changes, you'll want to provide GUI for the user to configure spacing and such. To find all of the changes I've made, do a [Ctrl][shift][F] for: //pyrochild: As I've flagged all of my changes with that tag. EDIT: Actually I'm going to spend some more time trying to fix the vista-issue first. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
pyrochild Posted March 14, 2008 Share Posted March 14, 2008 Ok. I fixed the issue by simply getting rid of the ListView. Listview is a horrible control anyways... I switched it with a ListBox, and made the necessary modifications elsewhere in the code (I did not bother to flag these ones, as they're trivial). The ImageList is gone as well - the ListBox gets its images straight from the BrushCollection. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! 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.