使用gdi+ Point destinationPoints[] = { Point(200, 20), // destination for upper-left point of original Point(110, 100), // destination for upper-right point of original Point(250, 30)}; // destination for lower-left point of original Image image(L"Stripes.bmp"); // Draw the image unaltered with its upper-left corner at (0, 0). graphics.DrawImage(&image, 0, 0); // Draw the image mapped to the parallelogram. graphics.DrawImage(&image, destinationPoints, 3); 简单说一下使用gdi+的方法 在stdafx.h加入 #include "gdiplus.h" #pragma comment(lib,"gdiplus.lib"); using namespace Gdiplus;在InitInstance中加入 GdiplusStartupInput gdiplusStartupInput;
GUI+ or DirectX or OpenGL
Point destinationPoints[] = {
Point(200, 20), // destination for upper-left point of original
Point(110, 100), // destination for upper-right point of original
Point(250, 30)}; // destination for lower-left point of original
Image image(L"Stripes.bmp");
// Draw the image unaltered with its upper-left corner at (0, 0).
graphics.DrawImage(&image, 0, 0);
// Draw the image mapped to the parallelogram.
graphics.DrawImage(&image, destinationPoints, 3);
简单说一下使用gdi+的方法
在stdafx.h加入
#include "gdiplus.h"
#pragma comment(lib,"gdiplus.lib");
using namespace Gdiplus;在InitInstance中加入
GdiplusStartupInput gdiplusStartupInput;
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
在ExitInstance加入
GdiplusShutdown(gdiplusToken);
变量gdiplusToken是CXXXAPP的成员变量
void glRotated( GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
其中angle是角度,x,y,z,指定了一个向量作为轴,例如x=0;y=0;z=1.0;表示Z轴。