Jump to content

FinishTokenUpdate() data unused


Recommended Posts

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.

KaHuc.png
Link to comment
Share on other sites

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().

KaHuc.png
Link to comment
Share on other sites

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.

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to comment
Share on other sites

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.

KaHuc.png
Link to comment
Share on other sites

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.

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to comment
Share on other sites

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.

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

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.

×
×
  • Create New...