[haiku-development] Re: Colors!

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 03 May 2012 09:32:02 +0200

Hi,

On 02.05.2012 20:19, John Scipione wrote:
On Mon, Apr 30, 2012 at 6:52 PM, Ingo Weinhold <ingo_weinhold@xxxxxx
    http://cgit.haiku-os.org/haiku/tree/src/apps/icon-o-matic

Well I'll be darned, I didn't know that Icon-O-Matic was open source.

Sure! You think I would have gotten away with including a new vector icon format in Haiku without also making the creation app open source? :-)

Looking at the code, the SwatchGroup class from Icon-O-Matic would be a
better base to create an updated BColorControl than the ColorPickerView
in Colors! since ColorPickerView has a bunch of other stuff like HSV RGB
boxes and the eye dropper that aren't really needed in BColorControl.
Also SwatchGroup is around the right dimensions.

The color picker (click the big swatch) included in I-O-M is based on Colors!. In retrospect, I probably should not have removed the dropper feature. In any case, I've applied some heavy optimizations and also fixes to the Colors! code. From memory, I've optimized the gradient creation in the main color area and similar problems. IIRC, Colors! used to draw the color area in a separate thread because it was so extremely slow. But that's what you get for using BView::StrokeLine() for each single pixel. It may be worthwhile to merge both code bases. You probably did your own share of improving the code. It could be nice to add the dropper and swatch features back to the I-O-M version, but making them optional, such that the swatch field can be turned off in I-O-M (programatically), but on in Colors!, once the code shared again. AFA sharing the code... there may be a place in the private shared area, which is sort of a staging area for eventual public APIs. After all, the code is already in the Haiku tree, just locked away in I-O-M. In that sense, it wouldn't make a big difference if Colors! became part of Haiku.

Best regards,
-Stephan



Other related posts: