Users benefit from being able to draw flowcharts directly on touch-enabled devices without the hassle of dropdown menus for shape selection or operations to adjust shapes and sizes of drawn objects. This disclosure automatically creates shape elements that match a user’s intention based on the drawing positions, shapes, sizes of strokes, etc. Beautified versions of a user’s drawing strokes are generated and used to replace the strokes. Using the techniques of this disclosure, the touch device intelligently distinguishes between drawing positions, shapes, and handwriting. The techniques distinguish shape from handwriting text and eliminates interruptions to user workflow due to the need to switch between shape mode and text mode.