"旋转的风车"----windows(GDI)绘图
这正是秋季将尽, 冬季未到的时节。 黄土高坡上已滚起了漫天黄沙, 而这里却是万里晴空如练! 风, 丝丝入骨! 未央柳即将枯死的枝条,仍在挣扎。 街道两旁清一色的银杏树叶, 金灿耀眼。 耀的令人感动, 感动的令人心碎! 很显然,这又是一个悲伤的人, 和一个悲伤的故事。
C艹老师给我们布置了一道作业, 就是 “旋转的风车”,卧槽! 我还几乎完全没有接触过 windows编程啊。我和室友“执手相看泪眼,竟无语凝噎!”。 无奈只有自己强势看textbook啦,然而,,,,这本书也是精炼的可以,,,,,由于是我的一位老师编写的, 我不做过多评论! 。看着书上仅有的两个示例, 不觉我已泪流满面, 无奈, 只有强行乱写一下啦! 心疼~~~~。
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABLcAAALYCAIAAAAB6IfsAAAgAElEQVR4nO3dW69l2XkW4PlXcue/gihOcgRYKEKCG0AIFTdcoCAECMWJcUKSHREHDNghJFg+yLZQOXF86HYiQZxILsdtCCVQqpFTEq7udrebdhdRaXCxT2vvdZrrW3N+Y4w5n0dLibtWVXep1lzvO98aq3YNBQCAay9fvnzx4sWLFy/efffd58+fP3/+/PXXX//utf8CjHPzrnn99dcv30rvvvvu5Zvr5cuXtd/oHDHU/gkAADRkcyVuDsXNrQiMcfnGuZmIVmJHrEQAgDt2DsWbrQiMdPPeMRG7YyUCANzx8uXLm6F4sxU35yIwxs175+bddPnmqv0W57irlfj429/5+ivfGPP41uM/9NICAMt2byhubkVgvM03kYnYkauV+JnPffH3v/Xa73/rO1uP1/7g8Wt/8Pi1L/zmq1/40itf+NIr//FTn33+/HndnzQAQIKX114AUTfvo9pvaE5wtRK/+srvvP/ixY/eP/J4/8WLL3/1le9973s7/k1PLh48uHiy6x82PXp499t3fMd737Tjezx6+IHddvw39/5MAADGewmcrvYbl6CrlfjqN373v/+P//3hj3/1p//dV37mE7/9kf/w5Y/++m9997v/6803nr/+9OnrT5++8cbzX/n8N3/l89/cuxJLKY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AYAQHZdDYAOTQOECMgIJvOBiCHxgFiBARk09kA5NA4QIyAgGw6G4AcGgeIERCQTWcDkEPjADECArLpbAByaBwgRkBANp0NQA6NA8QICMimswHIoXGAGAEB2XQ2ADk0DhAjICCbzgYgh8YBYgQEZNPZAOTQOECMgIBsOhuAHBoHiBEQkE1nA5BD4wAxAgKy6WwAcmgcIEZAQDadDUAOjQPECAjIprMByKFxgBgBAdl0NgA5NA4QIyAgm84GIIfGAWIEBGTT2QDk0DhAjICAbDobgBwaB4gREJBNZwOQQ+MAMQICsulsAHJoHCBGQEA2nQ1ADo0DxAgIyKazAcihcYAYAQHZdDYAOTQOECMgIJvOBiCHxgFiBARk09kA5NA4QIyAgGw6G4AcGgeIERCQTWcDkEPjADECArLpbAByaBwgRkBANp0NQA6NA8QICMimswHIoXGAGAEB2XQ2ADk0DhAjICCbzgYgh8YBYgQEZNPZAOTQOECMgIBsOhuAHBoHiBEQkE1nA5BD4wAxAgKy6WwAcmgcIEZAQDadDUAOjQPECAjIprMByKFxgBgBAdl0NgA5NA4QIyAgm84GIIfGAWIEBGTT2QDk0DhAjICAbDobgBwaB4gREJBNZwOQQ+MAMQICsulsAHJoHCBGQEA2nQ1ADo0DxAgIyKazAcihcYAYAQHZdDYAOTQOECMgIJvOBiCHxgFiBARk09kA5NA4QIyAgGw6G4AcGgeIERCQTWcDkEPjADECArLpbAByaBwgRkBANp0NQA6NA8QICMimswHIoXGAGAEB2XQ2ADk0DhAjICCbzgYgh8YBYgQEZNPZAOTQOECMgIBsOhuAHBoHiBEQkE1nA5BD4wAxAgKy6WwAcmgcIEZAQDadDUAOjQPECAjIprMByKFxgJj/D42ke6I9WMvUAAAAAElFTkSuQmCC" alt="" width="508" height="452" />
/* ***********************************************
Author : Cao Tan Xiao Ke
Language : C++
project : The windmills
************************************************ */ // caoTanXiaoKe.cpp : Define the application's entry point。
// #include "stdafx.h"
#include "caoTanXiaoKe.h"
#include <windows.h>
#include <cstdlib>
#include <cstring>
#include <cmath>
/*************************************************************************************
some constants **************************************************************************************/
#define Pi 3.1415626
const int cir = ;
const double angle = 0.2;
int T = ;
POINT nodes[], nodes2[], nodes3[]; // define the coordinates of the stiangle /***************************************************************************************
make a window ****************************************************************************************/
long WINAPI WndProc(HWND hWnd, UINT iMessage, UINT wParam, LONG lParam);
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPreInstance, LPSTR IpCmdLine, int nCmdShow)
{
MSG Message;
HWND hWnd;
WNDCLASS WndClass;
WndClass.cbClsExtra = ;
WndClass.cbWndExtra = ;
WndClass.hbrBackground = (HBRUSH)(GetStockObject(WHITE_BRUSH)); //white background
WndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
WndClass.hIcon = LoadIcon(NULL,"END");
WndClass.hInstance = hInstance;
WndClass.lpfnWndProc = WndProc;
WndClass.lpszClassName="SPin";
WndClass.lpszMenuName = NULL;
WndClass.style = ;
if(!RegisterClass(&WndClass))
{
MessageBeep();
return FALSE;
}
hWnd = CreateWindow(("SPin"), //create a window
("旋转的风车"),
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
,
CW_USEDEFAULT,
,
NULL,
NULL,
hInstance,
NULL);
ShowWindow(hWnd, nCmdShow); // show in window
UpdateWindow(hWnd); // Update and map the user area /***************************************************************************
the points of the pictures
***************************************************************************/ nodes[].x = ;
nodes[].y = ;
nodes[].x = ;
nodes[].y = ;
nodes[].x = ;
nodes[].y = ; for(int i=; i<=; i++)
{
nodes[i].x = (long)(nodes[i-].x*cos(2.0*Pi/)+nodes[i-].y*sin(2.0*Pi/));
nodes[i].y = (long)(nodes[i-].y*cos(2.0*Pi/)-nodes[i-].x*sin(2.0*Pi/));
} for(int i=; i<=; i++)
{
nodes2[i].x = (long)(nodes[i].x*cos(angle)+nodes[i].y*sin(angle));
nodes2[i].y = (long)(nodes[i].y*cos(angle)-nodes[i].x*sin(angle));
nodes3[i].x = (long)(nodes[i].x*cos(angle)+nodes[i].y*sin(angle))+;
nodes3[i].y = (long)(nodes[i].y*cos(angle)-nodes[i].x*sin(angle));
} for(int j=; j<=; j+=)
{
for(int i=; i<=; i++)
{
nodes[i].x = (long)(nodes[i].x*cos(angle)+nodes[i].y*sin(angle)*(1.25));
nodes[i].y = (long)(nodes[i].y*cos(angle)-nodes[i].x*sin(angle)*(1.25));
nodes2[j+i].x = nodes[i].x;
nodes2[j+i].y = nodes[i].y;
nodes3[j+i].x = nodes[i].x+;
nodes3[j+i].y = nodes[i].y;
}
} /**************************************************************************
a part of window
***************************************************************************/ while(GetMessage(&Message, , , )) //消息循环
{
TranslateMessage(&Message);
DispatchMessage(&Message);
} return Message.wParam;
} long WINAPI WndProc(HWND hWnd, UINT iMessage, UINT wParam, LONG lParam) //消息处理函数
{
HDC hDC; // 定义指向设备描述表的句柄
HBRUSH hBrush; // 定义指向画刷的句柄
HPEN hPen; // 定义指向画笔的句柄
PAINTSTRUCT PtStr; // 定义指向包含绘图信息的结构体变量
switch(iMessage) // 处理变量
{
case WM_PAINT: // 处理绘图消息
hDC = BeginPaint(hWnd, &PtStr); // 获得设备环境指针
SetWindowOrgEx(hDC, -, -, NULL); //设置原点坐标为(-300, -250)
hPen=CreatePen(PS_INSIDEFRAME, , RGB(, , ));
SelectObject(hDC, hPen); // 选择画笔
/*********************************************************************
draw your pictures
***********************************************************************/
Rectangle(hDC, -, -, , );
Ellipse(hDC, -, -, , ); Rectangle(hDC, , -, , );
Ellipse(hDC, , -, , ); hPen=CreatePen(PS_INSIDEFRAME, , RGB(, , )); // 创建红色画笔
hBrush=CreateSolidBrush(RGB(, , )); //创建红色画刷
SelectObject(hDC, hBrush); // 选入画刷
SelectObject(hDC, hPen); // 选入画笔
Polygon(hDC, nodes2+T*%cir, ); //
hBrush=CreateSolidBrush(RGB(, , )); //
SelectObject(hDC, hBrush); // 选入画刷
Polygon(hDC, nodes3++T*%cir, ); hPen=CreatePen(PS_INSIDEFRAME, , RGB(, , )); // 创建绿色画笔
hBrush=CreateSolidBrush(RGB(, , )); //创建绿色画刷
SelectObject(hDC, hBrush); // 选入画刷
SelectObject(hDC, hPen); // 选入画笔
Polygon(hDC, nodes2++T*%cir, ); //
hBrush=CreateSolidBrush(RGB(, , ));
SelectObject(hDC, hBrush); // 选入画刷
Polygon(hDC, nodes3+++T*%cir, ); hPen=CreatePen(PS_INSIDEFRAME, , RGB(, , )); // 创建蓝色画笔
hBrush=CreateSolidBrush(RGB(, , )); //创建蓝色画刷
SelectObject(hDC, hBrush); // 选入画刷
SelectObject(hDC, hPen); // 选入画笔
Polygon(hDC, nodes2++T*%cir, );
hBrush=CreateSolidBrush(RGB(, , )); //创建红色画刷
SelectObject(hDC, hBrush); // 选入画刷
Polygon(hDC, nodes3+++T*%cir, ); T++;
DeleteObject(hPen); // 删除画笔
DeleteObject(hBrush); // 删除画刷
EndPaint(hWnd, &PtStr); // 删除设备环境指针
if(T<)
Sleep(); // ----------------> 延时函数
else if(T<)
Sleep(-T);
else if(T<)
Sleep();
else if(T<=)
Sleep(T-);
if(T<=) InvalidateRect(hWnd, NULL, );
return ;
case WM_DESTROY:
PostQuitMessage();
return ;
default:
return(DefWindowProc(hWnd, iMessage, wParam, lParam));
}
}
小技巧: 旋转矩阵, 数组存点, 取模循环。
"旋转的风车"----windows(GDI)绘图的更多相关文章
- Windows GDI绘图基础知识
一.Windows可以画直线.椭圆线(椭圆圆周上的曲线)和贝塞尔曲线.////////////7 个画线函式是:(1)画直线LineTo BOOL LineTo(HDC hdc,int nXEn ...
- C# windows GDI+仿画图 绘图程序设计
C# windows GDI+仿画图 绘图程序设计 1.介绍 这里分享一个简单的画图程序 原作者:author: ping3108@163.com 2.程序主窗体设计 3.程序设计 本程序工程使用VS ...
- 第5章 绘图基础_5.1-5.4 GDI绘图
5.1 GDI的原理和结构 (1)提供一种特殊机制彻底隔离应用程序与不同输出设备(eg.显示器或打印机),以便支持 与设备无关的图形. 光栅设备(如显示器.激光打印机):图像是由点构成的矩阵 图形输出 ...
- MFC GDI绘图基础
一.关于GDI的基本概念 什么是GDI? Windows绘图的实质就是利用Windows提供的图形设备接口GDI(Graphics Device Interface)将图形绘制在显示器上. 在Wind ...
- C#-gdi绘图,双缓冲绘图,Paint事件的触发
一. 画面闪烁问题与双缓冲技术 1.1 导致画面闪烁的关键原因分析: 1 绘制窗口由于大小位置状态改变进行重绘操作时 绘图窗口内容或大小每改变一次,都要调用Paint事件进行重绘操作,该操作会使画面 ...
- GDI+(一):GDI+ 绘图基础
一.GDI+绘图基础 编写图形程序时需要使用GDI(Graphics Device Interface,图形设备接口),从程序设计的角度看,GDI包括两部分:一部分是GDI对象,另一部分是GDI函数. ...
- GDI+绘图基础
GDI+ 指的是.NET Framwork中提供的二维图像.图像处理等功能,是构成Windows操作系统的一个子系统,它提供了图形图像操作的应用程序编程接口(API). 使用GDI+可以用相同的方式在 ...
- windows gdi+ Bitmap 总结
windows gdi+ 是对 windows gdi 的一个c++封装,同时增加了一些扩展功能,如反走样,样条曲线,变换矩阵,图像编解码等. gdi+ 相对于 gdi 也存在一些不足之处,如 执行效 ...
- 用 windows GDI 实现软光栅化渲染器--gdi3d(开源)
尝试用windows GDI实现了一个简单的软光栅化渲染器,把OpenGL渲染管线实现了一遍,还是挺有收获的,搞清了以前一些似是而非的疑惑. ----更新2015-10-16代码已上传.gihub地址 ...
随机推荐
- 【iCore3 双核心板_FPGA】例程十三:FSMC总线通信实验——复用地址模式
实验指导书及代码包下载: http://pan.baidu.com/s/1nuYpI8x iCore3 购买链接: https://item.taobao.com/item.htm?id=524229 ...
- 【7集iCore3基础视频】7-5 iTool2驱动安装
iTool2驱动安装: 高清源视频:链接:http://pan.baidu.com/s/1dF5FtlB%20密码:g5x7 iCore3 购买链接:https://item.taobao.com/i ...
- centos安装php-memcached扩展及cas用法
一.安装libmemcachedwget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar ...
- angular 路由去除#号
1. 路由启动 $locationProvider.html5Mode(true); 通过pushstatex修改url app.js define([ 'angular', & ...
- JMeter学习-004-WEB脚本入门实战
此文为 JMeter 入门实战实例.我是 JMeter 初学菜鸟一个,因而此文适合 JMeter 初学者参阅.同时,因本人知识有限,若文中存在不足的地方,敬请大神不吝指正,非常感谢! 闲话少述,话归正 ...
- swift2.0单例
import Foundation public class SwiftSingleton{ var name = "000" public static le ...
- (九)串行口方式0 拓展并行输出端口 02 74LS164芯片
1.先讲解74LS164 移位芯片: 74HC164.74HCT164 是 8 位边沿触发式移位寄存器,串行输入数据,然后并行输出. 数据通过两个输入端(DSA 或 DSB)之一串行输入:任一输入端可 ...
- 改int非空自增列为int可为空列
) --声明读取数据库所有数据表名称游标mycursor1 open mycursor1 --从游标里取出数据赋值到我们刚才声明的数据表名变量中 fetch next from mycursor1 i ...
- Firefox刷新页面和复选框的奇葩问题
Firefox刷新页面后数据还在,估计很多人都碰到过. 但是有一个奇怪的地方就是复选框,如果你默认是勾选了,然后访问者取消勾选,刷新完之后,还是没有勾选,这是为什么? Firefox奇葩的地方就在于c ...
- HTML5 UI框架Kendo UI Web中如何创建自定义组件(二)
在前面的文章<HTML5 UI框架Kendo UI Web自定义组件(一)>中,对在Kendo UI Web中如何创建自定义组件作出了一些基础讲解,下面将继续前面的内容. 使用一个数据源 ...