Beatmup
gdi_bitmap.h
Go to the documentation of this file.
1
/*
2
Beatmup image and signal processing library
3
Copyright (C) 2019, lnstadrum
4
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#pragma once
20
21
#include "../abstract_bitmap.h"
22
#ifndef BEATMUP_PLATFORM_WINDOWS
23
#error GDI bitmap is Windows-specific.
24
#endif
25
26
namespace
Beatmup
{
27
28
/**
29
A simple wrapper of GDI bitmap
30
*/
31
class
GDIBitmap
:
public
AbstractBitmap
{
32
private
:
33
class
Impl
;
34
Impl
*
impl
;
35
36
public
:
37
GDIBitmap
(
Context
&
ctx
,
const
wchar_t
*
filename
);
38
39
GDIBitmap
(
Context
&
ctx
,
PixelFormat
format
,
int
width
,
int
height
);
40
41
const
PixelFormat
getPixelFormat
()
const
;
42
43
const
int
getWidth
()
const
;
44
45
const
int
getHeight
()
const
;
46
47
int
getStride
()
const
;
48
49
const
msize
getMemorySize
()
const
;
50
51
void
lockPixelData
();
52
53
void
unlockPixelData
();
54
55
const
pixbyte
*
getData
(
int
x
,
int
y
)
const
;
56
57
void
save
(
const
wchar_t
*
filename
);
58
};
59
60
}
Beatmup::AbstractBitmap
A very basic class for any image.
Definition:
abstract_bitmap.h:87
Beatmup::AbstractBitmap::ctx
Context & ctx
context managing this bitmap
Definition:
abstract_bitmap.h:102
Beatmup::Context
Basic class: task and memory management, any kind of static data.
Definition:
context.h:59
Beatmup::GDIBitmap
A simple wrapper of GDI bitmap.
Definition:
gdi_bitmap.h:31
Beatmup::GDIBitmap::unlockPixelData
void unlockPixelData()
Unlocks access to the CPU memory buffer containing pixel data.
Definition:
gdi_bitmap.cpp:209
Beatmup::GDIBitmap::GDIBitmap
GDIBitmap(Context &ctx, const wchar_t *filename)
Definition:
gdi_bitmap.cpp:167
Beatmup::GDIBitmap::getHeight
const int getHeight() const
Height of the texture in pixels.
Definition:
gdi_bitmap.cpp:189
Beatmup::GDIBitmap::lockPixelData
void lockPixelData()
Locks access to the CPU memory buffer containing pixel data.
Definition:
gdi_bitmap.cpp:204
Beatmup::GDIBitmap::getMemorySize
const msize getMemorySize() const
Bitmap size in bytes.
Definition:
gdi_bitmap.cpp:199
Beatmup::GDIBitmap::save
void save(const wchar_t *filename)
Definition:
gdi_bitmap.cpp:219
Beatmup::GDIBitmap::getWidth
const int getWidth() const
Width of the texture in pixels.
Definition:
gdi_bitmap.cpp:184
Beatmup::GDIBitmap::getData
const pixbyte * getData(int x, int y) const
Returns a pointer to given pixel.
Definition:
gdi_bitmap.cpp:214
Beatmup::GDIBitmap::getPixelFormat
const PixelFormat getPixelFormat() const
Pixel format of the bitmap.
Definition:
gdi_bitmap.cpp:179
Beatmup::GDIBitmap::impl
Impl * impl
Definition:
gdi_bitmap.h:33
Beatmup::GDIBitmap::getStride
int getStride() const
Definition:
gdi_bitmap.cpp:194
Beatmup::GDIBitmap::Impl
A simple wrapper of IL image.
Definition:
gdi_bitmap.cpp:32
Beatmup
Definition:
basic_types.h:22
Beatmup::msize
uint32_t msize
memory size
Definition:
basic_types.h:30
Beatmup::pixbyte
uint8_t pixbyte
Definition:
basic_types.h:34
Beatmup::PixelFormat
PixelFormat
Definition:
abstract_bitmap.h:70
format
JNIEnv jobject jint format
Definition:
wrapper_audio.cpp:36
y
jobject jlong jint jint y
Definition:
wrapper_core.cpp:253
filename
JNIEnv jlong jstring filename
Definition:
wrapper_core.cpp:616
width
jlong jint width
Definition:
wrapper_core.cpp:235
height
jlong jint jint height
Definition:
wrapper_core.cpp:235
x
jobject jlong jint x
Definition:
wrapper_core.cpp:253
core
bitmap
platform_specific
gdi_bitmap.h
Generated on Tue Nov 21 2023 13:54:26 for Beatmup by
1.9.1