mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 15:32:38 +00:00
Add LockedSurface::lockedWidth/Height() member functions
This commit is contained in:
parent
6b25004b48
commit
cbed44e627
@ -191,6 +191,14 @@ namespace she {
|
||||
|
||||
// LockedSurface implementation
|
||||
|
||||
int lockedWidth() const override {
|
||||
return m_bmp->w;
|
||||
}
|
||||
|
||||
int lockedHeight() const override {
|
||||
return m_bmp->h;
|
||||
}
|
||||
|
||||
void unlock() override {
|
||||
release_bitmap(m_bmp);
|
||||
}
|
||||
|
@ -25,6 +25,8 @@ namespace she {
|
||||
class LockedSurface {
|
||||
public:
|
||||
virtual ~LockedSurface() { }
|
||||
virtual int lockedWidth() const = 0;
|
||||
virtual int lockedHeight() const = 0;
|
||||
virtual void unlock() = 0;
|
||||
virtual void clear() = 0;
|
||||
|
||||
|
@ -85,6 +85,14 @@ public:
|
||||
|
||||
// LockedSurface impl
|
||||
|
||||
int lockedWidth() const override {
|
||||
return m_bitmap.width();
|
||||
}
|
||||
|
||||
int lockedHeight() const override {
|
||||
return m_bitmap.height();
|
||||
}
|
||||
|
||||
void unlock() override {
|
||||
m_bitmap.unlockPixels();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user