Krita/Grayscale Selections Discussion Notes

Jump to: navigation, search

Sven and Dmitry had a discussion of how we should treat our selections in Selection Based Layers and in Masks. We managed to formulate what we need from this design.

  1. The colorspace of the selection of these device should be represented for a user as a grayscale image. For example: black pixel means the mask in completely transparent, white pixel means -- completely opaque.
  2. When we select a Selection Based Layer or a Mask, all the color selectors (including pop-up palette) should change their colorspace and represent the current color as described in 1). It should be possible to select a "transparency color" of the brush with any particular selector.
  3. The brush's dab may have it's own colorspace like grayscale+alpha to support different blending modes and fading of the brush tip. When the dab is bitBlt'ed to the mask, the colorspace is converted to a simple grayscale one (without alpha).
  4. Selection tools should have access to global selection only. They should *not* affect the selection of the mask in any way. When a user uses a selection tool on a selection based layer it just creates the global selection only. This created selection may be used to fill the area with a solid "transparency color" or just limit painting with a usual brush.

These bullets just describe what we are going to achieve. The next stage is to work out a plan how we can achieve this and which classes we need to change and how.


This page was last edited on 4 April 2011, at 13:56. Content is available under Creative Commons License SA 4.0 unless otherwise noted.