Inheritance Graph
graph BT
PixelAccessor
PixelAccessor --> ReferenceCounter
click PixelAccessor "classUtil_1_1PixelAccessor"
click ReferenceCounter "classUtil_1_1ReferenceCounter"
Description
Class for direct access to the pixels of a Bitmap .
Note: After structural modifications of a Bitmap (e.g. changes of the size or the PixelFormat ) all corresponding PixelAccessors become invalid and may no longer be used.
Note: A PixelAccessor keeps a Reference to the associated Bitmap . If there exists no other reference to the Bitmap , it will be deleted if the PixelAccessor is deleted.
Public Types
Protected Functions
Public Static Functions
Public Functions
| |
|
| |
|
| |
~PixelAccessor() |
| |
|
| const AttributeFormat & |
getPixelFormat() const |
| |
|
| const Reference < Bitmap > & |
getBitmap() const |
| |
|
| uint32_t |
getWidth() const |
| |
|
| uint32_t |
getHeight() const |
| |
|
| Color4f |
readColor4f(uint32_t x, uint32_t y) const |
| |
|
| Color4ub |
readColor4ub(uint32_t x, uint32_t y) const |
| |
|
| float |
readSingleValueFloat(uint32_t x, uint32_t y) const Retrieve a single value from the bitmap (a value from the red channel for most bitmaps). |
| |
|
| uint8_t |
readSingleValueByte(uint32_t x, uint32_t y) const Retrieve a single value from the bitmap (a value from the red channel for most bitmaps). |
| |
|
| void |
writeColor(uint32_t x, uint32_t y, const Color4f & c) |
| |
|
| void |
writeColor(uint32_t x, uint32_t y, const Color4ub & c) |
| |
|
| void |
writeSingleValueFloat(uint32_t x, uint32_t y, float value) Write a single value to the bitmap (e.g., a value to the red channel for monochrome bitmaps). |
| |
|
| void |
fill(uint32_t x, uint32_t y, uint32_t width, uint32_t height, const Color4f & c) |
| template< typename _T > |
|
| _T * |
_ptr(const uint32_t x, const uint32_t y) |
| template< typename _T > |
|
| const _T * |
_ptr(const uint32_t x, const uint32_t y) const |
Documentation
typedef
Util::PixelAccessor::Ref
Defined in Util/Graphics/PixelAccessor.h:46
function
Util::PixelAccessor::checkRange
Defined in Util/Graphics/PixelAccessor.h:37
function
Util::PixelAccessor::crop
| |
|
|
| |
|
|
| bool crop( |
uint32_t & |
x, |
| |
uint32_t & |
y, |
| |
uint32_t & |
width, |
| |
uint32_t & |
height |
| ) const |
|
|
Defined in Util/Graphics/PixelAccessor.h:38
function
Util::PixelAccessor::getIndex
| |
|
|
| |
|
|
| uint32_t getIndex( |
uint32_t |
x, |
| |
uint32_t |
y |
| ) const |
|
|
Defined in Util/Graphics/PixelAccessor.h:39
function
Util::PixelAccessor::PixelAccessor
Defined in Util/Graphics/PixelAccessor.h:41
function
Util::PixelAccessor::create
Create a PixelAccessor for the given bitmap. According to the format of the Bitmap , an appropriate Accesor-type is chosen. If no accessor is available due to an unsupported format, nullptr is returned.
Defined in Util/Graphics/PixelAccessor.h:50
function
Util::PixelAccessor::copy
copies all pixels from source to dest if source and dest have incompatible dimensions only those pixels are copied which are valid in both
Defined in Util/Graphics/PixelAccessor.h:80
function
Util::PixelAccessor::~PixelAccessor
Defined in Util/Graphics/PixelAccessor.h:52
function
Util::PixelAccessor::getPixelFormat
Defined in Util/Graphics/PixelAccessor.h:54
function
Util::PixelAccessor::getBitmap
Defined in Util/Graphics/PixelAccessor.h:55
function
Util::PixelAccessor::getWidth
Defined in Util/Graphics/PixelAccessor.h:56
function
Util::PixelAccessor::getHeight
Defined in Util/Graphics/PixelAccessor.h:57
function
Util::PixelAccessor::readColor4f
Defined in Util/Graphics/PixelAccessor.h:59
function
Util::PixelAccessor::readColor4ub
Defined in Util/Graphics/PixelAccessor.h:60
function
Util::PixelAccessor::readSingleValueFloat
Retrieve a single value from the bitmap (a value from the red channel for most bitmaps).
Defined in Util/Graphics/PixelAccessor.h:62
function
Util::PixelAccessor::readSingleValueByte
Retrieve a single value from the bitmap (a value from the red channel for most bitmaps).
Defined in Util/Graphics/PixelAccessor.h:64
function
Util::PixelAccessor::writeColor
Defined in Util/Graphics/PixelAccessor.h:65
function
Util::PixelAccessor::writeColor
Defined in Util/Graphics/PixelAccessor.h:66
function
Util::PixelAccessor::writeSingleValueFloat
Write a single value to the bitmap (e.g., a value to the red channel for monochrome bitmaps).
Defined in Util/Graphics/PixelAccessor.h:68
function
Util::PixelAccessor::fill
| |
|
|
| |
|
|
| void fill( |
uint32_t |
x, |
| |
uint32_t |
y, |
| |
uint32_t |
width, |
| |
uint32_t |
height, |
| |
const Color4f & |
c |
| ) |
|
|
Fill the given area with the given color.
Note: Specific PixelAccessors may provide an optimized implementation
Defined in Util/Graphics/PixelAccessor.h:72
function
Util::PixelAccessor::_ptr
| |
|
|
| template< typename _T > |
|
|
| _T * _ptr( |
const uint32_t |
x, |
| |
const uint32_t |
y |
| ) |
|
|
Direct access to the pixel data.
Note: Be careful: No boundary checks are performed!
Defined in Util/Graphics/PixelAccessor.h:84
function
Util::PixelAccessor::_ptr
| |
|
|
| template< typename _T > |
|
|
| const _T * _ptr( |
const uint32_t |
x, |
| |
const uint32_t |
y |
| ) const |
|
|
Defined in Util/Graphics/PixelAccessor.h:87