# jaimefernandezl/paint202620 architecture

> Architecture diagram of the GitHub repository jaimefernandezl/paint202620, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jaimefernandezl/paint202620
- Repository: https://github.com/jaimefernandezl/paint202620

## Overview

Paint202620 is a Java Swing drawing application. The implemented workflow is: a user selects a drawing tool in the main window, draws by dragging on the canvas, and the canvas updates and renders the selected figure. The README also describes file operations and undo/redo as team responsibilities, but the sampled code does not show those capabilities implemented or connected; they are therefore not represented as working runtime components. The autosave manager is empty. Evidence is limited to the README and the supplied source excerpts/index.

Main entry points: [`src/ui/PanelDeDibujo.java`](https://github.com/jaimefernandezl/paint202620/blob/main/src/ui/PanelDeDibujo.java) (Drawing Canvas), [`src/figuras/Figura.java`](https://github.com/jaimefernandezl/paint202620/blob/main/src/figuras/Figura.java) (Figure Base), [`src/figuras/Trazo.java`](https://github.com/jaimefernandezl/paint202620/blob/main/src/figuras/Trazo.java) (Freehand Stroke), [`src/figuras/Linea.java`](https://github.com/jaimefernandezl/paint202620/blob/main/src/figuras/Linea.java) (Line)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Drawing UI"]
  node_window["Main Window"]
  node_canvas["Drawing Canvas<br/>[PanelDeDibujo.java]"]
end

subgraph group_figures["Drawing Model"]
  node_figure["Figure Base<br/>[Figura.java]"]
  node_line["Line<br/>[Linea.java]"]
  node_rectangle["Rectangle<br/>[Rectangulo.java]"]
  node_stroke["Freehand Stroke<br/>[Trazo.java]"]
end

node_user(("User"))

node_user -->|"uses"| node_window
node_window -->|"configures tools"| node_canvas
node_canvas -->|"creates"| node_line
node_canvas -->|"creates"| node_rectangle
node_canvas -->|"creates"| node_stroke
node_canvas -->|"stores and renders"| node_figure
node_line -->|"extends"| node_figure
node_rectangle -->|"extends"| node_figure
node_stroke -->|"extends"| node_figure
node_stroke -->|"renders segments"| node_line

click node_window "https://github.com/jaimefernandezl/paint202620/blob/main/src/ui/VentanaPrincipal.java"
click node_canvas "https://github.com/jaimefernandezl/paint202620/blob/main/src/ui/PanelDeDibujo.java"
click node_figure "https://github.com/jaimefernandezl/paint202620/blob/main/src/figuras/Figura.java"
click node_line "https://github.com/jaimefernandezl/paint202620/blob/main/src/figuras/Linea.java"
click node_rectangle "https://github.com/jaimefernandezl/paint202620/blob/main/src/figuras/Rectangulo.java"
click node_stroke "https://github.com/jaimefernandezl/paint202620/blob/main/src/figuras/Trazo.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_window,node_canvas,node_user toneBlue
class node_figure,node_line,node_rectangle,node_stroke toneAmber
```

## Components

### Drawing UI

- [Main Window](https://github.com/jaimefernandezl/paint202620/blob/main/src/ui/VentanaPrincipal.java): `src/ui/VentanaPrincipal.java`
- [Drawing Canvas](https://github.com/jaimefernandezl/paint202620/blob/main/src/ui/PanelDeDibujo.java): `src/ui/PanelDeDibujo.java`

### Drawing Model

- [Figure Base](https://github.com/jaimefernandezl/paint202620/blob/main/src/figuras/Figura.java): `src/figuras/Figura.java`
- [Line](https://github.com/jaimefernandezl/paint202620/blob/main/src/figuras/Linea.java): `src/figuras/Linea.java`
- [Rectangle](https://github.com/jaimefernandezl/paint202620/blob/main/src/figuras/Rectangulo.java): `src/figuras/Rectangulo.java`
- [Freehand Stroke](https://github.com/jaimefernandezl/paint202620/blob/main/src/figuras/Trazo.java): `src/figuras/Trazo.java`

### Other components

- **User**

## Connections

- User → Main Window: uses (evidence: `README.md`)
- Main Window → Drawing Canvas: configures tools (evidence: `src/ui/VentanaPrincipal.java`)
- Drawing Canvas → Line: creates (evidence: `src/ui/PanelDeDibujo.java`)
- Drawing Canvas → Rectangle: creates (evidence: `src/ui/PanelDeDibujo.java`)
- Drawing Canvas → Freehand Stroke: creates (evidence: `src/ui/PanelDeDibujo.java`)
- Drawing Canvas → Figure Base: stores and renders (evidence: `src/ui/PanelDeDibujo.java`)
- Line → Figure Base: extends (evidence: `src/figuras/Linea.java`)
- Rectangle → Figure Base: extends (evidence: `src/figuras/Rectangulo.java`)
- Freehand Stroke → Figure Base: extends (evidence: `src/figuras/Trazo.java`)
- Freehand Stroke → Line: renders segments (evidence: `src/figuras/Trazo.java`)
