Paint like application

Does anybody know a framework that could be used as a base for creation of paint like (but more complex) application.
This application will include
- layers
- drawing vector objects
- rotating, scaling all objects
- fill patterns
- brush patterns
- predefined shapes
and etc.

Thank you.