#ui: shape - prepare functions and mixins