Where Are All The Pretty Graphics?

Intelligent Assistance in CodeLab 2.20

June 4, 2017   -   Filed under: paint.net

This all started with me just wanting to add support for Ctrl+J in CodeLab. I had to refactor the auto completion code a bit in order to add that feature.

After I got it working, I realized the refactoring I had done would make it much easier to add support for Non-Member (Types, variables, keywords, ect.) auto completion.

I also added support for Highlighting word usage. To ensure matches, it compares spelling, casing, and word type (Type, Property, Field, Method, variable).

Bonus feature: I’ve also added Snippets for the following: if, else, switch, while, for, foreach, using.
Place the text caret on the right side of the word and press the Tab key (or press Tab twice when in the IntelliBox).


Unofficial Changelog:

– More robust detection of variables (can deal with multiple spaces between Type and variable name. Won’t parse variables in code comments)
– Added ‘Get’ & ‘Set’ to the IntelliBox tooltips for properties
– The IntelliBox can be invoked by pressing Ctrl+J
– The IntelliBox will no longer erroneous display when working within code comments
– Highlight word under the caret. Must match spelling, casing, and word type (Type, variable, property, method, ect.)
– Smarter commenting of code blocks (even when lines have varying indentations, the ‘//’ will vertically align. Empty lines are ignored)
– IntelliBox now works with array Types (ex: int[], string[]) members
– IntelliBox for Type constructors (doesn’t actually do any auto completion, but it will show the different constructors available)
– Added Snippets for a few keywords
– Fields can now be further differentiated as Constants or Enum Items.
– LOTS of code cleanup, bug fixes, and refactoring


The update is available from BoltBait on the official paint.net forum.

ShapeMaker v1.4 released

April 25, 2017   -   Filed under: paint.net - Tags:

The new version has a revamped user interface.
– Native controls; respects Windows themes
– Resizble window

There were also many “ease of use” enhancements made. See the full changelog over at the official paint.net fourm.

A Script Kiddie’s Guide to CodeLab

April 16, 2017   -   Filed under: paint.net

In the hopes of getting more people to use CodeLab, I wrote a guide aimed at Script Kiddies. It goes over all the things a non-programmer can do with CodeLab.

The guide is up on the official paint.net forums: CodeLab for average users – A Layman’s Guide

CodeLab v2.19 released

April 15, 2017   -   Filed under: paint.net

Back in the days of CodeLab v2.17, I contributed a new feature that displayed Error Messages (as tooltips) directly in the code editor. Unfortunately, there was a small bug with that feature: Given the right circumstances, it could crash paint.net.

This crashing bug went unnoticed (or at least unreported) for many months. CodeLab v2.18 was even released before it was reported. Not enough people are using CodeLab on a regular basis! 🙁


Anyways, v2.19 was released today, and it finally fixes the bug.

Another nice change I added in v2.19 is filtering of the IntelliBox (autocomplete box). As you type, items in the IntelliBox now filter to show only matching items.

^Here the IntelliBox has been filtered to only show items containing “gold”. Since the Gold item starts with “gold”, it is automatically selected.


For the full changelog, and to download, see BoltBait’s post on the official paint.net forums.

‘Rubber Stamp’ plugin has been published

  -   Filed under: paint.net

I have published the ‘Rubber Stamp’ paint.net plugin I previously mentioned.

Here’s an example ‘Before and After’…




It can be downloaded on the official paint.net forum.

Creating custom EffectEnvironmentParameters in paint.net

April 2, 2017   -   Filed under: paint.net

This weekend I made a new plugin for paint.net: ‘Rubber Stamp’. It uses the the built-in Clouds effect to create a rubber stamp texture, and masks it the object on the canvas.

The thing about the Clouds effect is that it’s hard-coded to use the Primary and Secondary colors from the Colors window. When the Clouds effect is called from another effect (like my plugin), the Primary and Secondary colors are set to their default values of Black and White. Unfortunately, they are stuck at Black and White, as the PrimaryColor and SecondaryColor properties only have getters; no setters.

What we have to do is create a custom EffectEnvironmentParameters object. In its constructor, we can set the PrimaryColor and SecondaryColor properties to whatever we want.

using (EffectEnvironmentParameters envirParameters = new EffectEnvironmentParameters(ColorBgra.Red, ColorBgra.Blue, 0, EnvironmentParameters.GetSelection(srcArgs.Bounds), srcArgs.Surface))
    cloudsEffect.EnvironmentParameters = envirParameters;

Here I used the colors of Red and Blue. Since the Cloud effect doesn’t use the Brush Width, it’s just set it to 0. Next I passed the selection defined PdnRegion, and the source Surface.

Finally I set the Clouds effect’s EnvironmentParameters property to my own custom EffectEnvironmentParameters with Red and Blue.

The structure of paint.net Effect plugins

March 30, 2017   -   Filed under: paint.net

Someone recently asked about documentation for creating paint.net plugins. Unfortunately, no official documentation exists. This lead me (and others)  to explain some of the concepts of effect plugins. As part of the discussion, I put together a chart to visualize the structure of both IndirectUI plugins and Custom GUI plugins. It still needs some polish, but here’s the current draft.

Blue Rectangles: Base Classes you derive from.
Black Ellipses: Classes you create
Green Ellipses: Classes IndirectUI creates “behind the scenes”

Blue Lines: Shows class derivation (shows the base class)
Red Lines: Shows the flow of Token values
Black Lines: Shows Classes being invoked from other classes

Fixing the GUI controls in ReactOS’s sndvol32

March 29, 2017   -   Filed under: ReactOS

Most people will never bother installing sound drivers on ReactOS, and thus would never see this bug. However, if you do install sound drivers, you’ll be able to open Volume Control (after ignoring a few Assert messages) and see it’s missing most of its controls.

I discovered incorrect parameters where being passed to the CreateWindowEx function (this was also causing the Assert messages). After poking around for a little longer, I found this was caused by an index becoming off-by-one when the horizontal separator was created.

Easy fix:

Patch submitted to preexisting bug report.

Browser notifications on Pandora

March 28, 2017   -   Filed under: Uncategorized

I wrote a simple Greasemonkey script to display a browser notification when a song plays in Pandora.

The script is available on Greasy Fork.

Update to the ‘Two-point Perspective’ plugin

March 27, 2017   -   Filed under: paint.net

I have rewritten much of the ‘Two-point Perspective’ paint.net plugin to make the code much simpler, cleaner, and efficient.

A new feature in this release in the “Draw Vanishing Point Guides” option. It looks like this (the red and blue lines):

Version 1.6 can be downloaded on the official paint.net forum.

The source code is on GitHub.