Paint Application – OOP-Based Desktop Drawing Tool
About Project
Paint Application is a desktop drawing application built with C# and Windows Forms, developed as a case study to demonstrate the practical application of Object-Oriented Programming (OOP) principles in .NET development.
The application allows users to create drawings using both freehand tools and predefined geometric shapes, including rectangles, ellipses, triangles, and hexagons. Users can select colors, erase parts of the drawing, select and delete shapes, and manage their work through save and load operations.
A key focus of this project is the OOP-based architecture. An abstract Shape base class defines common properties and behaviors, while concrete shape classes such as RectangleShape, EllipseShape, TriangleShape, and HexagonShape inherit from this base class and implement their own drawing logic. This design enables:
Abstraction: Shared behavior and properties defined in a common base class
Inheritance: Specialized shape implementations extending the base Shape class
Encapsulation: Shape data and drawing logic contained within their respective classes
Polymorphism: Unified handling of different shapes through a common interface
The application uses mouse event handling to provide an interactive drawing experience and the System.Drawing graphics library to render shapes on the canvas. All shapes are redrawn on each refresh cycle, ensuring consistent rendering and smooth user interaction.
For data persistence, drawings are saved in a custom .shapes file format using JSON serialization. Each shape’s type, position, dimensions, and color are stored, allowing the application to accurately reconstruct drawings when loading saved files.
Throughout this project, I gained hands-on experience with Windows Forms graphics, event-driven UI development, JSON-based persistence, and building a boundary-aware drawing system that prevents shapes from exceeding the canvas limits. The project demonstrates my ability to design clean, extensible, and maintainable desktop applications using core software engineering principles.
