GraphiteEditor / GraphiteEditor/Graphite

Tracking Issue: Design a new vector table-based data representation for paths, meshes, nondestructive styling, and appearance

Ouverte
#2,603 1 commentaire 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Architecture Graphics
Langage dominant
Rust
Étoiles
27.3k
Forks
1.3k
Merge moyen
20 h 5 min
PR mergées (30 j)
57

Description

This is a WIP brain dump for a new stab at the generalized mesh vector format. More thought is needed, but I wanted to put this down here before I forget.

Tables

To illustrate the data dependencies amongst the proposed tables, each bullet point stores data referenced by its sub-bullet points.

  • Points
    • Paths
      • Bends
      • Stroke Styles
      • Fill Styles

Points

Points describe positions in the local coordinate space. On their own, they represent a point cloud.

Paths

Paths describe the graph connectivity by listing walks of points. Each path is a list (or sub-table?) of point ranges, each representing a polyline. At least two points must be part of a path. A closed path is one that returns to its start point, representing a face (in the context of a 3D mesh like an OBJ file describes). Collectively, all the paths represent a vector mesh of straight edges. Paths have one-to-one correspondence with an imported SVG's subpaths in terms of topology (at least, for closed or non-filled shapes). With branching topology, multiple open paths make up portions of the overall shape.

Bends

Bends describe the curvature associated with every edge in a referenced path. They can be various types, such as splines (no handles specified), linear (essentially a no-op), quadratic (one handle), cubic (two handles), or other more exotic curve types. Handle points are references into the points table. If two paths independently specify the same edge or edges, their associated bends may curve them differently from one another.

Stroke Styles

  • #2310

Stroke styles describe all the paths corresponding to a particular stroke's paint. Each one contains a list (or sub-table?) of every path given the same style. If the style needs to change along a path, that needs to be broken up into separate adjoined paths. This is also the level at which tapered/variable stroke widths (#2207) are described, as well as dashes, caps, joins, and markers.

Fill Styles

  • #2309

Fill styles describe all the boundaries corresponding to a particular fill's paint (or no paint for unfilled space). Each one contains a list (or sub-table?) of every boundary. Boundaries can be entire paths, or specific ranges of segments within a path, or the first/last half of a single segment.

TBD: how does fill rule fit in, if that's applicable at the level of the whole shape? Maybe traditional SVG-style styling information and fill rule applies to a single Table<Vector> row while the full Table<Vector> uses the mesh fill strategy. So that might also mean some of the above descriptions need to be adjusted to work where mesh vector operates at the Table<Vector> level while possibly Vector only deals with non-branching paths?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par les tableaux proposés dans cet issue pour Points, Paths, Bends, Stroke Styles et Fill Styles, puis examinez les issues associées #2310, #2309 et #2207. Aucun fichier ni test n’est nommé ; le travail est terminé lorsque la représentation vectorielle proposée dispose d’une conception arrêtée et implémentable.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
rust
Domaine
computer-graphics
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
20/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.