processing / processing/processing-website

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

Đang mở
#625 2 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
MDX
Star
90
Fork
122
Merge trung bình
1 giờ 43 phút
Pull request đã merge (30 ngày)
3

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với trang tham chiếu shapeMode() và so sánh cách diễn đạt hiện tại với hành vi của GROUP PShape được thể hiện trong ví dụ. Xác nhận liệu hành vi này có áp dụng cho tất cả các hình GROUP hay không, rồi thêm phần làm rõ ngắn gọn nếu đúng; nếu không, hãy ghi lại các điều kiện phân biệt những trường hợp này.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Lĩnh vực
documentation
Loại issue
Tài liệu
Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
50/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.