Rotate/Zoom and IndirectUI in Paint.NET v4.0

In my last post I briefly mentioned that Rotate/Zoom had been converted to use IndirectUI. In the current release (v3.5.5) it is implemented with a custom WinForms dialog along with manual data binding, etc. It works fine and simply wasn’t a priority to convert in the v3.5 timeframe.

Well, here’s how it looks now:

It certainly fits in better with the rest of the UI now. The “roll ball 3D” control will also be available for plugins to use. In addition, thanks to some polite prodding by a prominent plugin author (pyrochild), I’ve added the ability to use the regular angle chooser control with a constrained range. Currently, only angle ranges of [-180, +180] and [0, +360] are permitted.

The greyed area shows the angle range that is not permitted.

I’m also planning to add the ability for IndirectUI-based effects and file type UI to use tab pages. This will be useful for having Basic/Advanced pages for file types, and to have more configurable effect properties without resorting to a “tall” UI dialog.

Anyway, that’s all for now!


6 thoughts on “Rotate/Zoom and IndirectUI in Paint.NET v4.0

  1. Rick Brewster says:

    Jon, IndirectUI is something plugins (effects and file types) can use to create their UI. Instead of writing a bunch of tricky and archaic WinForms code for UI controls, data binding, validation, etc. you can just define a property schema (name, type, range) and the UI is automatically generated.

    For example, the “Zoom” slider above is created because I instantiated a DoubleProperty (“double” as in System.Double for a 64-bit floating point value) with “Zoom” as the name and gave it min, max, and default values. I didn’t write any UI code for it.

  2. Dark says:

    i think putting the “preserve background” checkbox will be better next to the”Tiling” checkbox, i mean on the side, not under “Tiling”
    would save space, but maybe it’s because of the indirectUI as you mentioned it, anyway Paint.NET 4 seems to be shaping very well, and i can’t wait anymore, been waiting from 2007.

  3. Rick Brewster says:

    Dark, sure but there’s two reasons that won’t happen. 1) as you mention, this is just how IndirectUI works. 2) It only optimizes for English. On other languages, such as German, it would probably still have to wrap onto two lines, which means I’d have to code for both cases. Flow layout for checkboxes isn’t really a good idea in WinForms, so it would be a bunch of code and testing for minimal benefit. This current implementation keeps the code simpler with trivially negative impact. This frees up more time to work on more interesting things.

Comments are closed.