Applying and editing line-ending shapes