📄 gifexporter.h
字号:
#ifndef GIFEXPORTER_H
#define GIFEXPORTER_H
#include "util.h"
// wxwidgets
#include "wx/wx.h"
//#include "wx/frame.h"
//#include "wx/stattext.h"
//#include "wx/button.h"
// CxImage
#include "CxImage/ximage.h"
#include "CxImage/ximagif.h"
#include "CxImage/ximabmp.h"
#include "modelcanvas.h"
// Credit goes out to the Warcraft3 Viewer
class GifExporter: public wxFrame
{
DECLARE_CLASS(GifExporter)
DECLARE_EVENT_TABLE()
int TotalAnimFrames;// Total frames of the model animation
int TotalFrames; // Total frames of the animated gif
int CurFrame; // Current frame being rendered
int Width, Height;
long newWidth, newHeight;
long Delay;
bool Transparent, Diffuse, Shrink, Greyscale;
unsigned long size;
wxString Filename; // Filename to save our animated gif into.
CxImage **GifImages; // Our pointer array of images
//GUI objects
wxStaticText *lblCurFrame;
wxButton *btnStart, *btnCancel;
wxTextCtrl *txtFrames, *txtSizeX, *txtSizeY, *txtDelay;
wxCheckBox *cbTrans, *cbDither, *cbShrink, *cbGrey;
public:
GifExporter(ModelCanvas *c, wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString fn = "temp.gif");
~GifExporter();
// gui functions
//void ShowFrame();
void OnButton(wxCommandEvent &event);
void OnCheck(wxCommandEvent &event);
// Gif exporter functions
void BeginSaving();
void SaveFrame();
void EndSaving();
int TimeStep;
RGBQUAD *ppal;
ModelCanvas *canvas;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -