A digital painting application built with C and CSFML as part of the B-MUL-200 multimedia programming course at Epitech. This project demonstrates fundamental graphics programming concepts, user interface design, and drawing tool implementation.
MyPaint is a student project that recreates the basic functionality of a digital painting application. Built using C programming language and the CSFML (Simple and Fast Multimedia Library), it showcases skills in graphics programming, event handling, and software architecture.
This first-year project implements core features like drawing tools, canvas management, and a graphical user interface, serving as an introduction to multimedia programming and game development concepts.
- Pencil Tool: Basic line drawing with adjustable thickness
- Brush Tool: Brush strokes with opacity control
- Eraser Tool: Erase pixels with adjustable size
- Bucket Fill: Fill enclosed areas with color
- Color Picker: Sample colors from the canvas
- Canvas Support: Work with drawing canvases
- Zoom & Pan: Basic zooming and canvas navigation
- Canvas Positioning: Move and scale the canvas
- Transparent Background: Transparency grid display
- Canvas Creation: Create new canvases with different sizes
- Dark Theme: Simple dark interface
- Toolbar: Tool selection panel
- Color Picker Widget: RGB color selection
- Layer Panel: Basic layer management
- Tool Options: Thickness and opacity controls
- Image Formats: Support for PNG, JPG, BMP, TGA formats
- Load Images: Open existing images for editing
- Save Options: Export artwork in various formats
Alt + Scroll: Zoom in/outCtrl + Scroll: Move canvas horizontally+/-: Adjust tool thickness
Before building MyPaint, ensure you have the following dependencies installed:
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install build-essential gcc libcsfml-dev libsfml-devFedora/CentOS:
sudo dnf install gcc make CSFML-devel SFML-develArch Linux:
sudo pacman -S gcc make csfml sfml-
Clone the repository:
git clone https://github.com/your-username/paint.git cd paint -
Build the application:
make
-
Run MyPaint:
./my_paint
-
Launch the application:
./my_paint
-
Create a new canvas:
- Use the File menu to create a new project
- Choose from preset canvas sizes or create custom dimensions
- Select your preferred background color
-
Select drawing tools:
- Click on tools in the left toolbar
- Adjust thickness and opacity in the tool options panel
- Use the color picker to choose your colors
-
Save your work:
- Use File > Save As to export in various formats
- Choose from PNG, JPG, BMP, or TGA formats
- Canvas Navigation: Use Alt+Scroll for zooming, Ctrl+Scroll for panning
- Tool Settings: Adjust brush thickness and opacity
- Color Selection: Use the color picker to choose drawing colors
- Basic Layer Support: Simple layer management functionality
To compile the project:
makeTo clean object files and rebuild:
make clean
makeTo run the test suite:
make tests_runTo check coding style (Epitech norm):
make style- CSFML: Simple and Fast Multimedia Library for C
libcsfml-systemlibcsfml-windowlibcsfml-graphicslibcsfml-networklibcsfml-audio
- GCC: GNU Compiler Collection
- Make: Build automation tool
- Math Library:
libmfor mathematical operations
- Criterion: Unit testing framework (for testing)
- gcovr: Code coverage reporting (for testing)
- OpenSans font (
assets/opensans.ttf) - Tool icons and UI assets (PNG format)
- Transparency grid texture
This project is licensed under the MIT License - see the LICENSE.md file for details.
MIT License
Copyright (c) 2024 TekyoDrift
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
This is a student project, but contributions and improvements are welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -m 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Open a Pull Request
- Follow the Epitech coding style (use
make styleto check) - Comment your code appropriately
- Test new features before submitting
- Mallory Scotton - Lead Developer
- Hugo Cathelain - Core Developer
Made with β€οΈ and lots of learning β¨
A first-year project exploring graphics programming, C language, and CSFML. This paint application demonstrates fundamental concepts in multimedia programming and user interface development.




