rename: Pixmap > pixmap

This commit is contained in:
loic 2024-12-17 21:14:06 +01:00
parent 437dccbbba
commit f7d925ea65
2 changed files with 6 additions and 6 deletions

View file

@ -45,7 +45,7 @@ private:
Atom wmDelete; Atom wmDelete;
bool isWindowOpen; bool isWindowOpen;
bool isDisplayReady; bool isDisplayReady;
Pixmap Pixmap; Pixmap pixmap;
}; };
#endif //NOISE_GENERATOR_WINDOWMANAGER_HPP #endif //NOISE_GENERATOR_WINDOWMANAGER_HPP

View file

@ -111,8 +111,8 @@ void WindowManager::display_image() {
image.bytes_per_line = this->WindowWidth * 4; image.bytes_per_line = this->WindowWidth * 4;
image.bits_per_pixel = 32; image.bits_per_pixel = 32;
XPutImage(MainDisplay, Pixmap, DefaultGC(MainDisplay, 0), &image, 0, 0, 0, 0, WindowWidth, WindowHeight); XPutImage(MainDisplay, pixmap, DefaultGC(MainDisplay, 0), &image, 0, 0, 0, 0, WindowWidth, WindowHeight);
XCopyArea(MainDisplay, Pixmap, MainWindow, DefaultGC(MainDisplay, 0), 0, 0, WindowWidth, WindowHeight, 0, 0); XCopyArea(MainDisplay, pixmap, MainWindow, DefaultGC(MainDisplay, 0), 0, 0, WindowWidth, WindowHeight, 0, 0);
XFlush(MainDisplay); XFlush(MainDisplay);
} }
@ -127,15 +127,15 @@ void WindowManager::load_render(renderFunction r) {
void WindowManager::init_img() { void WindowManager::init_img() {
this->img = new u_int32_t[WindowWidth * WindowHeight]; this->img = new u_int32_t[WindowWidth * WindowHeight];
this->Pixmap = XCreatePixmap(MainDisplay, MainWindow, WindowWidth, WindowHeight, 24); this->pixmap = XCreatePixmap(MainDisplay, MainWindow, WindowWidth, WindowHeight, 24);
} }
void WindowManager::destroy_img() { void WindowManager::destroy_img() {
delete[] img; delete[] img;
XFreePixmap(MainDisplay, Pixmap); XFreePixmap(MainDisplay, pixmap);
} }
void WindowManager::resize_img() { void WindowManager::resize_img() {
this->destroy_img(); this->destroy_img();
this->init_img(); this->init_img();
} }