Write a program that enables the user to add and remove points in a two-dimensional plane dynamically, as shown in Figure 15.31a. A minimum bounding rectangle is updated as the points are
added and removed. Assume the radius of each point is 10 pixels.
在一个画布中,左键添加圆圈,如果圆圈不在画布内则扩大画布(rectangle)的范围;右键删除圆圈,如果删除的是边界上的则缩小画布范围。
问题是,如果要缩小,边界该怎么检测的?需要什么复杂的数据结构吗?
慕田峪9158850
MMMHUHU
相关分类