Talin is currently certified at Journeyer level.

Name: Talin
Member since: 2000-04-01 02:44:36
Last Login: 2009-04-20 17:45:36

FOAF RDF Share This

Homepage: http://www.viridia.org

Notes:

Been programming professionally since 1976. Entered the games industry in 1983, my first "hit" was The Faery Tale Adventure (Amiga, 1986). I've done MIDI sequencers, multi-player games and game tools, compilers, and lots more. While I've always liked sharing code, I got bitten by the open source bug after reading CatB. At the moment I'm working at Google, and on the side I'm working on a library for concurrent garbage collection.

Articles Posted by Talin

Recent blog entries by Talin

Syndication: RSS 2.0

New Millenium, new Job!

As of yesterday, I am an employee of Explorati, a company that is working on online social environments. I decided I was really tired of working on e-commerce. Also, about half the people working at Explorati are friends of mine. I really wanted to work at someplace where I could share a dream with the other members of the company.

Transfer modes are working in the paint widget! "Blend" and "Blur" painting work, with variable levels of transparency.Haven't done "colorize" or "rub-through" yet, but those should be pretty simple.

    Other things that got done include:
  • Optimized redrawing of images for various widgets when "imageChanged" signal is recieved
  • Finished scratchpad preview area
  • First cut at serialization of image sets

Here's a screenshot.

Got the flood fill working, I stole the algorithm from some other code I had lying around. Only took about an hour to get it working. One aspect that was a little tricky is that QPixmap doesn't have a "getPixel" method, I had to convert it into a QImage to actually test the pixel values. However, when actually drawing the pixels, I can draw onto the target pixel map directly rather than having to convert the image back to a pixel map. (Actually, I optimized it so that it draws in horizontal strips rather than one pixel at a time.)

I also made it so that you can render the flood filled pixels onto a stencil bitmap. This would allow you to "floodfill" various pixel effects, such as brighten, darken, etc.

I also added a bunch more tool buttons to the tool bar - magnify, clip brush, pen size, etc. About the only thing left to do on the paint pad is the transfer modes. Once I get that done, I can work on the rest of the application.

Qt's QPainter doesn't have a FloodFill primitive...oh well, it's not hard to write one, I have some code around here somewhere. That's somewhat surprising, I guess flood-filling isn't used much in modern apps except for paint programs.

The painting widget is looking better and better. I finished the "eyedropper" tool, and drew a bunch of icons for the various tool buttons.

I eventually want to make the paint pad widget a standalone component that other people can use. Icon editors, sprite editors, tile editors, etc...

After a frustrating day rebuilding my company's internal intranet server, I can have a relaxing evening programming... :-)

I am more and more impressed with Qt all the time. I've been writing a little mini "paint pad" widget for the Anima project. One of the primitives that I had hoped to implement eventually was rotated ellipses, in other words ellipses whose major axes are not aligned with the coordinate system. (These are especially useful in creating isometric tile sets.) Having struggled with this before, I know that there are basically three ways to draw a rotated ellipse:

  • Use a 2nd-order DDA, similar to Bresenham's algorithm, but for curves. Unfortunately, DDA's can get confused on very thin ellipses, and even go into an infinite loop.
  • Just compute the points directly using sin/cos. This works OK, but can have problems with quantization artifacts unless you get the spacing just right.
  • Approximate the ellipse with spline curves. This is probably the best overall solution.

So I noticed that Qt had a normal, axis-aligned ellipse primitive, like everyone else has. I also noticed that they also had a way to set up coordinate transformations (rotate, shear, etc.) into the QPainter object. "Big deal", I thought, "they're probably just running the input params through a transform matrix, the basic primitives are probably still axis aligned." Well, I had to check it out, and - surprise - the ellipse was actually rotated!

I've been leveraging the basic Qt drawing primitives to the max, and as a result I've been able to put together a complete painting widget in just a few days. It supports multiple brush sizes, can be extended with new stroke types and new transfer modes (such as colorize, brighten, etc.)

Since KIconEdit seems to be broken at the moment, I'm going to let the paint pad widget draw it's own icons. Gotta get that saving/loading function to work first...!

3 older entries...

 

Talin certified others as follows:

  • Talin certified Talin as Journeyer
  • Talin certified stig as Master
  • Talin certified dsifry as Journeyer
  • Talin certified starshine as Journeyer
  • Talin certified BrucePerens as Master
  • Talin certified bdale as Master
  • Talin certified esr as Master
  • Talin certified DrCode as Journeyer
  • Talin certified deirdre as Journeyer
  • Talin certified phr as Journeyer
  • Talin certified anselm as Journeyer

Others have certified Talin as follows:

  • Talin certified Talin as Journeyer
  • dsifry certified Talin as Journeyer
  • starshine certified Talin as Journeyer
  • JB318 certified Talin as Journeyer
  • bdale certified Talin as Journeyer
  • claw certified Talin as Journeyer
  • jtraub certified Talin as Journeyer
  • nixnut certified Talin as Journeyer
  • DrCode certified Talin as Journeyer
  • phr certified Talin as Journeyer
  • monk certified Talin as Journeyer
  • slef certified Talin as Apprentice
  • Qbert certified Talin as Journeyer

[ Certification disabled because you're not logged in. ]

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

X
Share this page