-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathHImage.h
52 lines (43 loc) · 1.81 KB
/
HImage.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
50
51
52
// HImage.h
// Copyright (c) 2009, Dan Heeks
// This program is released under the BSD license. See the file COPYING for details.
#pragma once
#include "../interface/HeeksObj.h"
class HImage: public HeeksObj
{
private:
// in the case of the movie "C:\image00001.jpg" ( for example ) will be changed to "C:\image00045.jpg",
// where 45 is the frame number stored in theApp.m_animation_current_frame
unsigned int m_texture_number;
int m_frame_when_loaded;// for movies only. only valid if m_texture_number != 0
int width, height, textureWidth, textureHeight;
bool m_rectangle_intialized;
void destroy_texture();
const wxChar* GetTextureFileName(const wxString &file_path, int is_a_movie);
void do_vertex_for_lots_of_quads( double x, double y );
public:
double m_x[4][3]; // bottom left, bottom right, top right, top left
wxString m_file_path;
bool m_lots_of_quads;
HImage(const wxChar* file_path);
HImage(const HImage &p);
virtual ~HImage();
// operators
const HImage& operator=(const HImage &p);
// HeeksObj's virtual functions
int GetType()const{return ImageType;}
long GetMarkingMask()const{return MARKING_FILTER_IMAGE;}
void glCommands(bool select, bool marked, bool no_color);
void GetBox(CBox &box);
const wxBitmap &GetIcon();
const wxChar* GetShortString(void)const;
const wxChar* GetTypeString(void)const{return _("Image");}
HeeksObj *MakeACopy(void)const;
void ModifyByMatrix(const double *mat);
void GetGripperPositions(std::list<GripData> *list, bool just_for_endof);
void GetProperties(std::list<Property *> *list);
bool Stretch(const double *p, const double* shift, void* data);
void CopyFrom(const HeeksObj* object){operator=(*((HImage*)object));}
void WriteXML(TiXmlNode *root);
static HeeksObj* ReadFromXMLElement(TiXmlElement* pElem);
};