Merge pull request #365 from lordhoto/protected-pixels
Make Graphics::Surface::pixels protected.
This commit is contained in:
commit
7f8308e0eb
158 changed files with 597 additions and 595 deletions
|
@ -82,6 +82,14 @@ void Surface::free() {
|
|||
format = PixelFormat();
|
||||
}
|
||||
|
||||
void Surface::init(uint16 width, uint16 height, uint16 newPitch, void *newPixels, const PixelFormat &f) {
|
||||
w = width;
|
||||
h = height;
|
||||
pitch = newPitch;
|
||||
pixels = newPixels;
|
||||
format = f;
|
||||
}
|
||||
|
||||
void Surface::copyFrom(const Surface &surf) {
|
||||
create(surf.w, surf.h, surf.format);
|
||||
if (surf.pitch == pitch) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue