关于MinGW中BGI的2个问题 [英] 2 questions about BGI in MinGW
本文介绍了关于MinGW中BGI的2个问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是使用graphics.h的初学者,我不知道如何在MinGW中进行这些思考:
1.如何制作动画以在右侧移动正方形?
2.如何旋转一个圆?
谢谢.
I am beginner using graphics.h and i don''t know how to do those thinks in MinGW :
1.How to make an animation to move a square in the right side ?
2.How to spin a circle ?
Thanks.
推荐答案
AFAIK,您不能将BGI
与MinGW
一起使用.BGI
是Turbo C/C++
提供的图形库(您是否正在使用 WinBGIm [
AFAIK you cannot useBGI
withMinGW
.BGI
is the graphics library provided byTurbo C/C++
(are you using WinBGIm[^]?).
[Update]
Move the square to the right:
- 擦除当前位置
{x,y}
上的正方形. - 更新位置
{x,y}->{x+dx, y}
. - 延迟一段时间(例如,调用
Sleep()
函数). - 从点
1
开始重复.
- Erase the square at current position
{x,y}
. - Update position
{x,y}->{x+dx, y}
. - Delay for some time (e.g. calling
Sleep()
function). - Repeat from point
1
.
您可以使用矩形 [旋转圆圈"是什么意思?
[/Update]
You may use the rectangle[^] function to draw the square.
BTW What do you mean with "spin a circle"?
[/Update]
这篇关于关于MinGW中BGI的2个问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文