#include <Channel.h>
Classes | |
| class | ConstIter |
| class | Iter |
| struct | Obj |
Public Member Functions | |
| ChannelT () | |
| default constructor, creates an invalid ChannelT | |
| ChannelT (int32_t width, int32_t height) | |
| Allocates and owns a contiguous block of memory that is sizeof(T) * width * height. | |
| ChannelT (int32_t width, int32_t height, int32_t rowBytes, uint8_t increment, T *data) | |
| Does not allocate or own memory pointed to by data. | |
| ChannelT (ImageSourceRef imageSource) | |
| Creates a ChannelT by loading from an ImageSource imageSource. | |
| operator ImageSourceRef () const | |
| ChannelT | clone (bool copyPixels=true) const |
| Returns a new Channel which is a duplicate. If copyPixels the pixel values are copied, otherwise the clone's pixels remain uninitialized. | |
| ChannelT | clone (const Area &area, bool copyPixels=true) const |
| Returns a new Channel which is a duplicate of an Area area. If copyPixels the pixel values are copied, otherwise the clone's pixels remain uninitialized. | |
| int32_t | getWidth () const |
| Returns the width of the Channel in pixels. | |
| int32_t | getHeight () const |
| Returns the height of the Channel in pixels. | |
| Vec2i | getSize () const |
| Returns the size of the Channel in pixels. | |
| float | getAspectRatio () const |
| Returns the Channel aspect ratio, which is its width / height. | |
| Area | getBounds () const |
| Returns the bounding Area of the Channel in pixels: [0,0]-(width,height). | |
| int32_t | getRowBytes () const |
| Returns the width of a row of the Channel measured in bytes, which is not necessarily getWidth() * getPixelInc(). | |
| uint8_t | getIncrement () const |
Returns the amount to increment a T* to increment by a pixel. For a planar channel this is 1, but for a Channel of a Surface this might be 3 or 4. | |
| bool | isPlanar () const |
Returns whether the Channel represents a tightly packed array of values. This will be false if the Channel is a member of a Surface. Analogous to getIncrement() == 1 | |
| T * | getData () |
| const T * | getData () const |
| T * | getData (const Vec2i &offset) |
| const T * | getData (const Vec2i &offset) const |
| T * | getData (int32_t x, int32_t y) |
| const T * | getData (int32_t x, int32_t y) const |
| T | getValue (Vec2i pos) const |
| Convenience method for getting a single value. For performance-sensitive code consider Channel::Iter instead. Exhibits clamping behavior when outside Channel boundaries. | |
| void | setValue (Vec2i pos, T v) |
| Convenience method for setting a single value. For performance-sensitive code consider Channel::Iter instead. Exhibits clamping behavior when outside Channel boundaries. | |
| void | copyFrom (const ChannelT< T > &srcChannel, const Area &srcArea, const Vec2i &relativeOffset=Vec2i::zero()) |
| T | areaAverage (const Area &area) const |
| void | setDeallocator (void(*aDeallocatorFunc)(void *), void *aDeallocatorRefcon) |
| Iter | getIter () |
| Iter | getIter (const Area &area) |
| ConstIter | getIter () const |
| ConstIter | getIter (const Area &area) const |
Protected Attributes | |
| shared_ptr< Obj > | mObj |
|
| |
| typedef shared_ptr< Obj > ::unspecified_bool_type | unspecified_bool_type |
| Emulates shared_ptr-like behavior. | |
| operator unspecified_bool_type () const | |
| Emulates shared_ptr-like behavior. | |
| void | reset () |
| Emulates shared_ptr-like behavior. | |
| typedef shared_ptr<Obj>::unspecified_bool_type cinder::ChannelT< T >::unspecified_bool_type |
Emulates shared_ptr-like behavior.
| cinder::ChannelT< T >::ChannelT | ( | ) |
default constructor, creates an invalid ChannelT
| cinder::ChannelT< T >::ChannelT | ( | int32_t | width, | |
| int32_t | height | |||
| ) |
Allocates and owns a contiguous block of memory that is sizeof(T) * width * height.
| cinder::ChannelT< T >::ChannelT | ( | int32_t | width, | |
| int32_t | height, | |||
| int32_t | rowBytes, | |||
| uint8_t | increment, | |||
| T * | data | |||
| ) |
Does not allocate or own memory pointed to by data.
| cinder::ChannelT< T >::ChannelT | ( | ImageSourceRef | imageSource | ) |
Creates a ChannelT by loading from an ImageSource imageSource.
| cinder::ChannelT< T >::operator ImageSourceRef | ( | ) | const |
| ChannelT< T > cinder::ChannelT< T >::clone | ( | bool | copyPixels = true |
) | const |
Returns a new Channel which is a duplicate. If copyPixels the pixel values are copied, otherwise the clone's pixels remain uninitialized.
| ChannelT< T > cinder::ChannelT< T >::clone | ( | const Area & | area, | |
| bool | copyPixels = true | |||
| ) | const |
Returns a new Channel which is a duplicate of an Area area. If copyPixels the pixel values are copied, otherwise the clone's pixels remain uninitialized.
| int32_t cinder::ChannelT< T >::getWidth | ( | ) | const |
Returns the width of the Channel in pixels.
| int32_t cinder::ChannelT< T >::getHeight | ( | ) | const |
Returns the height of the Channel in pixels.
| Vec2i cinder::ChannelT< T >::getSize | ( | ) | const |
Returns the size of the Channel in pixels.
| float cinder::ChannelT< T >::getAspectRatio | ( | ) | const |
Returns the Channel aspect ratio, which is its width / height.
| Area cinder::ChannelT< T >::getBounds | ( | ) | const |
Returns the bounding Area of the Channel in pixels: [0,0]-(width,height).
| int32_t cinder::ChannelT< T >::getRowBytes | ( | ) | const |
Returns the width of a row of the Channel measured in bytes, which is not necessarily getWidth() * getPixelInc().
| uint8_t cinder::ChannelT< T >::getIncrement | ( | ) | const |
Returns the amount to increment a T* to increment by a pixel. For a planar channel this is 1, but for a Channel of a Surface this might be 3 or 4.
| bool cinder::ChannelT< T >::isPlanar | ( | ) | const |
Returns whether the Channel represents a tightly packed array of values. This will be false if the Channel is a member of a Surface. Analogous to getIncrement() == 1
| T* cinder::ChannelT< T >::getData | ( | ) |
| const T* cinder::ChannelT< T >::getData | ( | ) | const |
| T* cinder::ChannelT< T >::getData | ( | const Vec2i & | offset | ) |
| const T* cinder::ChannelT< T >::getData | ( | const Vec2i & | offset | ) | const |
| T* cinder::ChannelT< T >::getData | ( | int32_t | x, | |
| int32_t | y | |||
| ) |
| const T* cinder::ChannelT< T >::getData | ( | int32_t | x, | |
| int32_t | y | |||
| ) | const |
| T cinder::ChannelT< T >::getValue | ( | Vec2i | pos | ) | const |
Convenience method for getting a single value. For performance-sensitive code consider Channel::Iter instead. Exhibits clamping behavior when outside Channel boundaries.
| void cinder::ChannelT< T >::setValue | ( | Vec2i | pos, | |
| T | v | |||
| ) |
Convenience method for setting a single value. For performance-sensitive code consider Channel::Iter instead. Exhibits clamping behavior when outside Channel boundaries.
| void cinder::ChannelT< T >::copyFrom | ( | const ChannelT< T > & | srcChannel, | |
| const Area & | srcArea, | |||
| const Vec2i & | relativeOffset = Vec2i::zero() | |||
| ) |
| T cinder::ChannelT< T >::areaAverage | ( | const Area & | area | ) | const |
| void cinder::ChannelT< T >::setDeallocator | ( | void(*)(void *) | aDeallocatorFunc, | |
| void * | aDeallocatorRefcon | |||
| ) |
| cinder::ChannelT< T >::operator unspecified_bool_type | ( | ) | const |
Emulates shared_ptr-like behavior.
| void cinder::ChannelT< T >::reset | ( | ) |
Emulates shared_ptr-like behavior.
| Iter cinder::ChannelT< T >::getIter | ( | ) |
| Iter cinder::ChannelT< T >::getIter | ( | const Area & | area | ) |
| ConstIter cinder::ChannelT< T >::getIter | ( | ) | const |
| ConstIter cinder::ChannelT< T >::getIter | ( | const Area & | area | ) | const |
shared_ptr<Obj> cinder::ChannelT< T >::mObj [protected] |