#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<graphics.h>
#include<conio.h>
#include<math.h>
#include<dos.h>
int init;
int read_mouse;
void cursor;
void newxy;
int main()
{
int buttons,x,y;
char str[];
int driver=VCA;
int moede=VGAHT;
initgraph(&gdriver,&mode,"");
cleardevice();
rectangle(,,,);
setfillstyle(,);
circle(,,);
x=,y=;
cursor(x,y);
for(;;)
{ newxy(&x,&y,&butttons);
if(x>=&&x<=&&y>=&&y<=&&buttons)
{
cleardevice();
closegraph();
exit();
}
}
}
void(int x,int y)
{ int x1,x2,y1,y2;
x1=x-;
x2=x+;
y1=y-;
y2=y+;
line(x1,y,x2,y);
line(x,y1,x,y2);
}
int read_mouse(int*mx,int*my,int*mbutton)
{
union REGS regs;
int x0=*mx,y0=*my,button0=*mbutton;
int xnew,ynew;
do
{
regs.x.ax=;
int86(0x33,&regs,&regs);
xnew=regs.x.cx;
ynew=regs.x.dx;
*mbutton=regs.x.bx;
}
while(xnew==x0&&ynew==y0&&*mbutton==button0);
*mx=xnew;
*my=ynew;
switch(*mbutton)
{ case :
return ;
case :
return ;
case :
return ;
case :
return3;
default :
return4;
}
}
void newxy(int *mx,int *my,int *mbutt)
{ int ch,xx0=*mx,yy0=*my;
int xm,ym;
ch=read_mouse(&xm,&ym,mbutt);
curse(xx0,yy0);
curse(xm,xy);
switch(ch)
{ case : break;
case : cirse(xm,ym,);break;
case : rectangle(xm-,ym-,xm+,ym+);break;
default : putpixel(xm,ym,);break;
}
*mx=xm;
*my=ym;
}

beijing的更多相关文章

  1. bzoj 2659: [Beijing wc2012]算不出的算式

    2659: [Beijing wc2012]算不出的算式 Time Limit: 3 Sec  Memory Limit: 128 MB Description 算不出的算式背景:曾经有一个老掉牙的游 ...

  2. Kalendar server Beijing Tiandiyuandian Technology Limited 果然是木马

    我的Windows 7 系统,在开始菜单里面输入msconfig ,回车打开系统配置,隐藏所有Microsoft的进程,在服务和启动项里面都有 Kalendar server   Beijing Ti ...

  3. Amazon Kindle Device is hiring in Beijing Shanghai and Shenzhen!

    This is Angela from recruitment team of Amazon Kindle Device Software & Applications, we are exp ...

  4. BZOJ 2661: [BeiJing wc2012]连连看 费用流

    2661: [BeiJing wc2012]连连看 Description 凡是考智商的题里面总会有这么一种消除游戏.不过现在面对的这关连连看可不是QQ游戏里那种考眼力的游戏.我们的规则是,给出一个闭 ...

  5. BZOJ2253: [2010 Beijing wc]纸箱堆叠

    题解: 其实就是求三维偏序最长链.类似于三维逆序对,我们可以用树状数组套平衡树来实现. DP方程 :f[i]=max(f[j]+1) a[j]<a[i] 我们按一维排序,另一位建立树状数组,把第 ...

  6. Unite Beijing 2015大型活动

    摘要:2015年,我做的最疯狂的事情:网友见面会—去北京参加Unite Beijing 2015大会. 正文:记得,上次在北京参加大型活动还是2008年前–传统电信行业的巅峰时期:那时移动互联网.An ...

  7. 【二分答案+贪心】UVa 1335 - Beijing Guards

    Beijing was once surrounded by four rings of city walls: the Forbidden City Wall, the Imperial City ...

  8. LA 3177 Beijing Guards(二分法 贪心)

    Beijing Guards Beijing was once surrounded by four rings of city walls: the Forbidden City Wall, the ...

  9. BZOJ2661: [BeiJing wc2012]连连看

    2661: [BeiJing wc2012]连连看 Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 483  Solved: 200[Submit][S ...

  10. Bzoj 2662: [BeiJing wc2012]冻结 dijkstra,堆,分层图,最短路

    2662: [BeiJing wc2012]冻结 Time Limit: 3 Sec  Memory Limit: 128 MBSubmit: 647  Solved: 348[Submit][Sta ...

随机推荐

  1. LeetCode OJ:4Sum(4数字之和)

    Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = tar ...

  2. CSS: The resize Property

    用户手动调节输入框样式: <!DOCTYPE html> <html> <head> <style> div { border: 2px solid; ...

  3. Agilent RF fundamentals (5)

    2考虑两个因素 3 RX 4 TX RX switch use Duplexer

  4. 纯css实现Magicline Navigation(下划线动画导航菜单)

    看别人网站的时候,看到一种导航菜单的动画,觉得很有意思,就仔细研究起来. 目前见过的动画有三种:水平下划线动画导航.水平背景动画导航.垂直动画导航,他们实现思路都是一样的,都是依赖 css3的同级通用 ...

  5. Arcgis Add-In开发入门实例

    作为一个本科侧重于应用,工作之后却做了开发的程序员来说,做GIS,开发应该是一门必修课,只是,苦于各种原因吧,做GIS应用的人会开发的很少,做GIS开发的大部分都是计算机出身,痛心疾首啊-- 不好意思 ...

  6. let防止变量声明提前

    let可以解决原来js中,一个函数中变量混乱的问题,因为以前var 定义的变量时, {}是不能限制变量作用域的. "use strict"; +function(){ var t= ...

  7. JavaScript中的二分法插入算法

    算法主体部分 var OnlineUser = { //list : 待查找的数组 //key : 待插入的值 //order : 数组的顺序 1:从小到大 0:从大到小 //start : 开始查找 ...

  8. I.MX6 fbset 使用

    /****************************************************************************** * I.MX6 fbset 使用 * 说 ...

  9. 9.9 Python 文档字符串

    9.9 Python 文档字符串. 进入 Python 标准库所在的目录. 检查每个 .py 文件看是否有__doc__ 字符串, 如果有, 对其格式进行适当的整理归类. 你的程序执行完毕后, 应该会 ...

  10. Jetty服务怎么配置,如何发布项目

    Jetty相对于Tomcat来时相对较轻,适合多并发且有较多实时通讯的系统,能够稳定的保持连接且占用资源相对较少.今天就简单介绍一下Jetty的配置及项目部署. 工具/原料 Jetty 电脑 Jett ...