-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathscreen.cpp
59 lines (48 loc) · 1.67 KB
/
screen.cpp
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
53
54
55
56
57
58
59
/*************************
* screen.cpp
*
*
* editor: amo
*************************/
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <stdlib.h>
#include <screen.h>
/* -------------------------------------------------------------------- */
/* my define macro */
/* -------------------------------------------------------------------- */
/* -------------------------------------------------------------------- */
/* global variables */
/* -------------------------------------------------------------------- */
/* -------------------------------------------------------------------- */
/* implements */
/* -------------------------------------------------------------------- */
MyScreen::MyScreen(int x, int y){
std::cout << "[MyScreen::MyScreen(int, int)]: ... pixelX:" << pixelX << " and pixelY:" << pixelY << std::endl;
pixelX = x;
pixelY = y;
}
MyScreen::MyScreen(){
std::cout << "[MyScreen::MyScreen()]: ... pixelX:" << pixelX << " and pixelY:" << pixelY << std::endl;
pixelX = 0;
pixelY = 0;
}
MyScreen::~MyScreen(){
std::cout << "[MyScreen::~MyScreen()]: ... pixelX:" << pixelX << " and pixelY:" << pixelY << std::endl;
}
void MyScreen::showSize(){
std::cout << "[MyScreen::showSize()]: ... pixelX:" << pixelX << " and pixelY:" << pixelY << std::endl;
}
void MyScreen::setX(int x){
pixelX = x;
}
void MyScreen::setY(int y){
pixelY = y;
}
int MyScreen::getPixelX(){
return pixelX;
}
int MyScreen::getPixelY(){
return pixelY;
}