⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 windowobject.cpp

📁 一个漂亮的万花筒游戏
💻 CPP
字号:
// WindowObject.cpp: implementation of the WindowObject class.
//
//////////////////////////////////////////////////////////////////////
#include <assert.h>
#include "ezwin.h"
#include "WindowObject.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

WindowObject::WindowObject(SimpleWindow &w,
 const Position &p) : Window(w), Location(p) {
 // No body needed
}


Position WindowObject::GetPosition() const {
	return Location;
}

void WindowObject::GetPosition(float &x, float &y) const {
   x = Location.GetXDistance();
   y = Location.GetYDistance();
   return;
}

SimpleWindow& WindowObject::GetWindow() const {
   return Window;
}

void WindowObject::SetPosition(const Position &p) {
   Location = p;
   return;
}

void WindowObject::SetPosition(float x, float y) {
   Location = Position(x, y);
   return;
}



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -