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.
有什么方法可以使用 Draw2d 实现放大和缩小?我不想使用 GEF 框架。是否可以使用Draw2d来实现,请您提供一些示例或链接。我在这里添加的一个小改动。我可以使用 ZoomManager。Butis有任何例子avaialbel?
如果你把所有东西都放在一个ScalableLayeredPane(或者ScalableFreeformLayeredPane如果你使用自由图形)中,你可以通过调用setScale(double newZoom)它来设置缩放。ZoomManager调用相同的方法。
ScalableLayeredPane
ScalableFreeformLayeredPane
setScale(double newZoom)
ZoomManager