andlabs / andlabs/libui

uiDrawMatrixScale center

未关闭
#331 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C
星标
10.9k
派生
612
PR 合并指标
30 天内没有已合并 PR

描述

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)

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。