-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImage.h
49 lines (38 loc) · 865 Bytes
/
Image.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once
#include <Windows.h>
#include <math.h>
#include <assert.h>
#define PI 3.14159265358979323846
#define pow2(x) x*x
#define _RObjectMaxSize 100000
typedef struct sImage {
HBITMAP bitmap;
HDC Image;
HDC Mask;
int width;
int height;
}sImage;
typedef struct RenderingObject {
sImage *img;
int diagSize;
int xPos;
int yPos;
HDC RotatedImage;
HDC RotatedMaskImage;
HBITMAP RotatedBitmap;
HBITMAP RotatedMaskBitmap;
float rotateDegree;
POINT rotatePoint[3];
}RObject;
typedef struct RenderingObjectArray {
int maxSize;
int nextPos;
RObject* array[_RObjectMaxSize];
}RObjectArray;
RObjectArray _RObjects;
RObject* GetRObject(int handle);
void _initializeRenderObjectArray();
void RotateRObject(int handle, float degree);
void _rotateRObject(RObject* obj, float degree);
int _registerRObject(sImage *obj);
void _disposeRObjectArray();