Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

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

Aberta
#625 2 comentários 1 reação 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
1/5
Tempo estimado
Menos de uma hora
Facilidade para iniciantes
50/100
Tipo de issue
Documentação
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Domínio
documentation

Direção de pesquisa

Comece pela página de referência de shapeMode() e compare a redação atual com o comportamento de GROUP PShape mostrado no exemplo. Confirme se o comportamento se aplica a todas as formas GROUP e, se confirmado, adicione um esclarecimento conciso; caso contrário, documente as condições que distinguem os casos.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
MDX
Estrelas
91
Forks
121
Merge médio
1h 15min
PRs com merge (30d)
5

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de processing/processing-website

Todas as issues de processing/processing-website

Issues semelhantes

Mais issues de Documentation

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.