applicius/dhek — pull request #129 by YoEight (2014-05-22 13:13:15+00:00)
Title: DHEK27 - Distribute horizontally selected areas

*Goal is to have same horizontal space between all selected area, sharing distance from the left most area to the right most area.*

In selection mode when several areas are selected, consider L as the most left area and R the most right area.

- d = R.x - L.x + R.w → distance between L and R.
- an → Number of selected areas (not only L and R.
- aw → Sum of width of all selected areas (not only L and R.
- s = (d - aw) / (an - 1) → homogeneous space (between area).

Then consider selected areas in a sorted way from left to right, except L (left most area). For each such area A:

- P → Previous/at left selected area.
- l = P.x + P.w → Right/end of previous area.

Finally for each A, update A.x to l+s .