AmirAbdollahi/paint
概要
This is a simple desktop application built with C# and WinForms that simulates the basic functionality of the classic Microsoft Paint. It allows users to draw shapes, use different colors and brush sizes, and interact with a canvas using mouse events.
デザイン・メディアできること
- Draw lines, rectangles, ellipses, and freehand shapes
- Change pen color and thickness
- Fill shapes with colors
- Save your drawing
計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- +1
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルPaint Application (C#)
Welcome to my Paint application — one of the first major challenges I tackled when I started learning C#. This project holds a special place in my journey as a developer, and it's a fun attempt to simulate the basic functionality of the classic MS Paint application.
Features
- Draw lines, rectangles, ellipses, and freehand shapes
- Change pen color and thickness
- Fill shapes with colors
- Erase content
- Clear canvas
- Save your drawing
Screenshots
Demo GIF
Project Goals
The main goal of this project was to simulate the basic functionalities of the classic Microsoft Paint application using C# and WinForms. The focus was on learning graphical programming concepts, handling user inputs, and building an interactive desktop UI. It served as a hands-on project to understand:
- Event-driven programming
- Drawing graphics on a canvas
- Real-time mouse interaction
- Building user-friendly interfaces
Architecture Overview
The project follows a simple structure, designed for learning and experimentation rather than scalability. Here's an overview of how it's built:
- Windows Forms (WinForms): Used for the UI and drawing surface.
- Main Form (UI Layer): Contains buttons, color selectors, and the drawing canvas.
- Drawing Logic: Handles mouse events (Down, Move, Up) to draw on the canvas using the
Graphicsobject. - State Management: Keeps track of selected tool, color, brush size, and drawing mode.
Technical Details
- Language: C#
- Framework: .NET Framework (WinForms)
- Drawing Surface:
PictureBoxor a custom panel used to handle drawing. - Rendering: Uses
Graphicsclass for shapes and freehand lines. - Mouse Events:
MouseDown,MouseMove, andMouseUpevents are used for drawing actions. - Brush Settings: Allows changing color and pen width dynamically.
- Save Feature: Exports the drawing as an image file using
BitmapandSaveFileDialog.
How to Run
Clone the repository:
git clone https://github.com/AmirAbdollahi/paint.gitOpen the solution file (
Paint.sln) in Visual Studio.Build and run the project.
Motivation
This was a self-challenge project during my early days of learning C#. I wanted to explore how to handle graphics, user input, and WinForms events. It helped me gain a deeper understanding of Windows desktop development and UI rendering.
What I Learned
- Drawing on
Graphicsobjects - Managing user interactions like mouse movements
- Handling UI components and events in WinForms
- Basics of color and shape manipulation in a GUI
Acknowledgments
Inspired by the classic Microsoft Paint and my curiosity about how drawing tools work behind the scenes.
Contribution
Feel free to explore, fork, or improve this project. I'd love to see what you come up with!
関連プロジェクトを探す
読み込み中…