SVG Shape Generator

C#
GitHub Repository

SVG Shape Generator

The SVG Shape Generator is a C# project designed to create and manipulate SVG shapes such as circles, rectangles, ellipses, polygons, lines, and more. This tool allows users to generate random shapes, group them, modify their properties, and export them to an SVG canvas. Developed and tested on Windows 10 using Visual Studio Code.

Features

  • Shape Creation: Create a variety of SVG shapes such as circles, rectangles, polygons, and lines.
  • Shape Management: Read, update, and delete shapes. Modify shape parameters like position, size, stroke, and fill.
  • Group and Style: Group shapes and apply styles like colors, stroke-width, and transformations (rotate, scale, skew).
  • Export to SVG: Export all shapes to an SVG file with customizable z-index for layering shapes.
  • Random Shape Generation: Generate shapes with random parameters and colors.
  • Text Addition: Add random or default text with various styles and fonts to the SVG canvas.

Supported Shapes

  • Circle: Generates circles with customizable position, radius, stroke, and fill.
  • Rectangle: Creates rectangles with customizable width, height, and colors.
  • Ellipse: Allows for the creation of ellipses with adjustable radii.
  • Line: Draws lines between two points with customizable stroke.
  • Polyline: Generates complex shapes by connecting multiple points.
  • Polygon: Creates polygons by connecting multiple points with edges.
  • Path: Allows for drawing custom paths with complex commands.

Prerequisites

  • Visual Studio Code or any C# compatible IDE.
  • .NET runtime installed on your machine.

How to Use

Run the application through the command line. You will be prompted to choose an operation to perform: bash dotnet run

  1. Create a Shape
  2. Display a Shape
  3. Update a Shape
  4. Delete a Shape
  5. Create a Default Shape
  6. Group Shapes
  7. Ungroup Shapes
  8. Add Style to Group
  9. Add Text
  10. Export to SVG and finish

Contact

For any inquiries or feedback, feel free to reach out to:

Jevgenij Ivanov
Email: ladnopokaa@gmail.com

GitHub: https://github.com/Ladnopoka
itch.io: https://ladnogames.itch.io/
YouTube: https://www.youtube.com/@LadnoDev
X: https://x.com/Ladnopokaa
Discord: https://discord.gg/BPsncTZe