📄 mgpixmap.cpp
字号:
#include "render_interface.h"#include "mgsize.h"#include "mgpixmap.h"MGPixmap::MGPixmap(){ loadOk = false; memset( &bmp, 0, sizeof( bmp ) );}MGPixmap::~MGPixmap(){ if( loadOk ) UnloadBitmap( &bmp );}int MGPixmap::width() const{ return loadOk?bmp.bmWidth:0;}int MGPixmap::height() const{ return loadOk?bmp.bmHeight:0;}const MGBitmap* MGPixmap::mask() const{ // dont support return 0;}MGSize MGPixmap::size() const{ return loadOk?MGSize( bmp.bmWidth, bmp.bmHeight ):MGSize(0,0);}void MGPixmap::resize( int w, int h ){ // dont support}void MGPixmap::resize( const MGSize& ){ // dont support} bool MGPixmap::isNull() const{ if(!loadOk)return 1; return bmp.bmBits == NULL;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -