当前位置:网站首页>显示一个圆,并可以移动
显示一个圆,并可以移动
2022-07-21 09:33:00 【51CTO】
这个问题虽简单,却“五脏俱全”。
1,需求
a,显示圆
b,移动圆
2,概要设计
a,已知圆心和半径,显示圆
b,单击圆开始移动,再次单击结束移动
3,详细设计
a,如果一个点到圆心的距离等于(小于)半径,则在圆上(圆内)。
b,移动过程中以虚线显示。
4,编码
1,新建一个单文档程序Yuan。
2,CYuanView内增加三个变量:
CPoint m_pt;//圆心
int m_iR;//半径
BOOL m_bMove;//是不是在移动
3,构造函数中初始化。
4,显示圆
5,移动
已知问题:
移动开始后无法取消。
源码: http://pan.baidu.com/share/link?shareid=574458&uk=4280148702
边栏推荐
- R language uses fmsb package to visualize radar chart (radar chart, spider plot), independently display radar charts of multiple data objects, add average gray areas, and compare each radar chart with
- CTF problem solving ideas
- VLAN与三层交换机
- Commutateur H3C pour voir les commandes associées
- Left ear mouse: five capabilities that developers in the cloud native era should have
- 08. Merge sort and quick sort
- Resolved (selenium operation Firefox browser error) typeerror:__ init__ () got an unexpected keyword argument ‘firefox_ options‘
- 电脑是怎样上网的 (一) 消息产生 DNS
- Tencent techo hub landed in Fuzhou 723 for the first time in 2022 to discuss industrial digitalization with developers!
- Feign details, log configuration + contract settings + timeout + custom interceptors
猜你喜欢
基于JSP实现OA办公系统
Tencent techo hub landed in Fuzhou 723 for the first time in 2022 to discuss industrial digitalization with developers!
网络地址转换(NAT)
SVD奇异值分解——矩阵压缩
Musk uploaded his brain to the cloud? Zhou Hongyi: we have to use human brain security guards to kill poison
Value extraction in template and generic programming
[googletest] googletest unit test (1) get started quickly
STM32+ENC28J60+UIP协议栈实现WEB服务器示例
Creation of gateway routing service
Qt | Qt的项目文件.pro文件详解
随机推荐
网络地址转换(NAT)
08. Merge sort and quick sort
excel if 判读单元格如果为空就不参与计算
js對象:檢測屬性是否存在
3537. Tree lookup
【无标题】
利用二分寻找峰值
Ancient Chinese civilization
Skywalking integrated logging framework, alarm and high availability cluster construction
【开发教程6】AI语音人脸识别(会议记录仪/人脸打卡机)-串口
CONDA create, view, delete virtual environment
Skywalking custom link tracking and performance analysis
Numpy04_ Linear algebra (unfinished)
The content of the architecture is excerpted from "happy when you smell defects" (this book can be downloaded for free)
第二章 软件过程与思想 第一节 基础
网络层协议介绍
数对(动态开点)
Fluent introduces the graphic verification code and retains the sessionid
thymeleaf应用笔记
指南针 司南