虽然这个部件与屏幕上的任何可视像素都不对应,但是它在GTK +的控件布局中扮演着重要角色,您很快就会看到这一点。
Even though that widget doesn't correspond to any pixels visible on the screen, it plays a crucial role in how GTK + lays out its controls, as you will see shortly.
这会提供一组对应于新缩放级的坐标像素。
This provides a set of pixel coordinates corresponding to what the new zoom level should be.
您可以通过保证范围(每个投影长度单元对应多少像素)在 x 和 y 方向上相同(或接近)来防止这种情况发生。
You can prevent this by making sure the scale (how many pixels correspond to each projected unit of distance) is the same (or close) in both the x and y directions.
应用推荐