MaLiang is a painting framework based on Metal. It supports drawing and handwriting with customized textures. The name of "MaLiang" comes from a boy who had a magical brush in a Chinese ancient fairy story. A Canvas is the basic component of MaLiang. You will paint all things on it. Canvas extends from MetalView, which extends from MTKView. MetalView handles all the logic with MetalKit and hides them from you. MaLiang supports the automatic adjustment of stroke size with painting force. 3D Touch is supported by default, and simulated force will be setup on devices that do not support this. forceSensitive is the property that force affects the stroke size. It should be set between 0 to 1. the smaller the value is, the less sensitive will be. if sets to 0, then force will not affect the stroke size.
Features
- Lines with Bezier Curve
- Chartlet element (for image and any other content from an UIView snapshot)
- Force based Adjustment for stroke size
- 3D Touch supported
- Save vector contents to disk
- Zoom & Scale
- Export to image