andlabs / andlabs/libui

uiDrawMatrixScale center

Đang mở
#331 9 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C
Star
10.9k
Fork
612
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Are the `xCenter` and `yCenter` coordinates relative to the element ~(as with rotation, right?)~ or the area?
https://github.com/andlabs/libui/blob/9cf56e1674168689f677a803b3b59cb21a27e0cf/ui.h#L472

(I'm guessing it's relative to the area).
I'm trying to scale the rectangle with it's center as the scale center.
Here I drew the rectangle at (50,50) and set the scale center to (50,50). Why does the rectangle move while changing the scaling factor?

![uiscale](https://user-images.githubusercontent.com/4586894/38209048-54247c32-36b3-11e8-91b4-42266afa53f9.gif)

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

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

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.