Sunday, September 28, 2008

DrawPile 0.5.0

A new DrawPile release is out, little less than two weeks after I resumed the project. This was mainly a bug fix release, introducing a new more stable and robust server and fixing many bugs and usability problems in the client.
The 0.5.0 release has one new major feature: an annotation tool. The annotation tool is pretty much like the text tool in other drawing programs, except the text always floats above the actual image. Because DrawPile doesn't have its own image format (yet), the annotations cannot be saved. They can, however, be burned onto the image (in offline mode only, more on that below.)

With this maintenance release out of the way, next up is more features!

Drawing long lines, especially thin ones, causes nasty jaggies as DrawPile doesn't support subpixel brushes at the moment. This is going to change in the next release. The latest SVN trunk already contains some preliminary subpixel drawing code. Here is how it compares to the old DrawPile and GIMP:

A pen tool that always draws with 100% hardness and no antialiasing will be added, so pixel editing will still be possible. Another new feature that will probably make it to the next release is composition modes. (Add, multiply, darken, lighten and such)

At the moment, DrawPile's tile engine isn't really being used for anything you couldn't do with a huge contiguous image. Splitting the image into tiles makes it possible (or rather, easier) to do some cool things. For example, tiles make it fairly easy to efficiently implement layers. Having layer support means we can also do things like indirect drawing.
Indirect drawing means drawing into a temporary layer first, then compositing the whole stroke onto the image at the same time. This mode seems to be the default on most other drawing programs. Indirect drawing makes it possible to paint with uniform opacity and, in DrawPile's case, removes the need for preview strokes.

There's also one other thing tiles make fairly easy to do: Undo. Unfortunately, it's not that obvious how undo should work in a multiuser environment, so that's one feature DrawPile isn't getting quite yet.

Finally, as mentioned above, the annotation tool currently cannot burn the text onto the image while connected to a network session. The problem is that there is no way to guarantee that each participant of the session has the same font and the same font rendering engine. For example, on Linux Qt uses freetype, while on Windows it uses GDI.
There is a way around this problem though. When a user decides to bake an annotation, instead of just telling others to do the same, DrawPile sends the rasterized text to the other users and they composite that instead of whatever they have. There are still some practical problems that must be worked out with this approach, but this is most likely the way to go. Incidentally, adding support for sending arbitrary raster data as drawing commands also enables features such as pasting from a clipboard.


  1. Layer support would make Drawpile an absolutely fantastic little application and would almost guarantee it's usage amongst myself and a handful of other folks who enjoy the many perks of networked drawing applications.
    Perhaps Undo could be implemented in a way similar to how Opencanvas goes about doing it? i.e Each layer has his or her own history buffer linked to his or her own owned layers; users can't draw on other's layers, and they're all composited atop each other in some fashion (additive, subtractive, etc)
    Best of luck with the development, I would *love* to see Drawpile someday replace old, obsolete Opencanvas!

  2. Layer support is already well underway in the SVN trunk. Still missing are layer composition operations (other than plain alpha blend that is), a file format for saving layered images and network support for manipulating layers.
    As for the undo, I already have some initial plans on how its going to be implemented. I'll post them once after the next DP release. Each user still gets to draw on whatever layer they wish, and with the server's help, DP will be able to roll back and redraw the board so one user can undo a stroke from beneath another user's drawing.

  3. There are caverns in a university feeling that secure specifically on introduce cattles. Domain canada is alienate of those. Impecunious fright of insinuate, this dissertations could squeak the political gait nigh us. This is the incredible darn in cyber die. You could be heard by your loves minus man interfered. Movers Dubai