Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个圆形图像,但我在某些设备上的 android 设备上使用它,它不是完美的圆形。我怀疑像素始终是正方形或可以是矩形,具体取决于设备。如果是这样如何处理这个问题,因为圆形图像在宽度和高度上具有相同数量的像素。
你是对的,像素并不总是正方形的。这取决于屏幕,以及它在每个方向上的每英寸点数 (DPI)。
如果您知道屏幕的“真实”尺寸(毫米等)的确切尺寸,您可以适当地缩放它,但我不知道在运行时可以找到它。