21 lines
375 B
C++
21 lines
375 B
C++
|
//
|
||
|
// ImageLock.cpp
|
||
|
// libscgui
|
||
|
//
|
||
|
// Created by Bob Polis at 2020-10-24
|
||
|
// Copyright (c) 2020 SwiftCoder. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#include "ImageLock.hpp"
|
||
|
#include "Image.hpp"
|
||
|
|
||
|
using namespace sc::gui;
|
||
|
|
||
|
ImageLock::ImageLock(const Image& image) : _image {image} {
|
||
|
SDL_LockSurface(image.surface());
|
||
|
}
|
||
|
|
||
|
ImageLock::~ImageLock() {
|
||
|
SDL_UnlockSurface(_image.surface());
|
||
|
}
|