关于MinGW中BGI的2个问题 [英] 2 questions about BGI in MinGW

查看:124
本文介绍了关于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,您不能将BGIMinGW一起使用. BGITurbo C/C++提供的图形库(您是否正在使用 WinBGIm [
AFAIK you cannot use BGI with MinGW. BGI is the graphics library provided by Turbo C/C++ (are you using WinBGIm[^]?).

[Update]
Move the square to the right:
  1. 擦除当前位置{x,y}上的正方形.
  2. 更新位置{x,y}->{x+dx, y}.
  3. 延迟一段时间(例如,调用Sleep()函数).
  4. 从点1开始重复.
  1. Erase the square at current position {x,y}.
  2. Update position {x,y}->{x+dx, y}.
  3. Delay for some time (e.g. calling Sleep() function).
  4. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆