Policy of updating graph changed. Strokes are given to updateGraph by
mouse coordinates and mask size, not by alpha.

After mouse button released, new stroked are forbidden, need to select
type of stroke of cancel button
After selecting stroke type updateGraph function is called