processing / processing/processing-website

Reference enhancement for `shapeMode()` - it does not affect GROUP shapes

Aperta
#625 2 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
MDX
Stelle
90
Fork
122
Merge medio
1h 43m
PR unite (30g)
3

Descrizione

Which area of the website does this enhancement relate to?

Reference

Describe the enhancement

I propose for the shapeMode() reference page to include the information that when a PShape object is a GROUP it will not be affected by the shapeMode() drawing mode and will always be drawn from the "internal" origin of the shape. I think this behavior should not change.

Tentative/suggested addition:

Shape mode will not affect the drawing of GROUP PShape objects.

Why is this enhancement important?

I believe other users might be surprised by this behavior, as I was, and seek clarification at the reference documentation, which could have a note about it.

Additional context
void setup(){
     size(200, 200);
    
    shapeMode(CENTER);

    PShape shp = createShape(GROUP);
    PShape square = createShape(RECT, 0, 0, 80, 80);
    shp.addChild(square);
    shape(shp, 100, 100);
    
    PShape other = createShape();
    other.beginShape();
    other.noFill();
    other.vertex(0, 0);
    other.vertex(80, 0);
    other.vertex(80, 80);
    other.vertex(0, 80);
    other.endShape(CLOSE);    
    shape(other, 100, 100);
}

Image

I wonder if someone could confirm this is true for all GROUP shapes? If it is not the behavior for all groups, how to differentiate and predict the behavior? If this behavior is found to be incorrect, a bug, could we have an ORIGIN mode to trigger exactly this behavior on GROUPS?

I found out about this behavior because py5 generates GROUP shapes when converting from external geometry sources. Ref: https://github.com/py5coding/py5generator/discussions/623

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dalla pagina di riferimento di shapeMode() e confronta la formulazione attuale con il comportamento di GROUP PShape mostrato nell'esempio. Conferma se il comportamento si applica a tutte le forme GROUP e, in caso affermativo, aggiungi una breve precisazione; altrimenti documenta le condizioni che distinguono i casi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
1/5
Tempo stimato
Meno di un'ora
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
50/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.