#include <kino_plugin_types.h>
Collaboration diagram for kino::basic_bitmap< PixelType >:

Public Types | |
| typedef PixelType | pixel_type |
| typedef PixelType * | iterator |
| typedef const PixelType * | const_iterator |
| typedef basic_bitmap< pixel_type > | this_type |
Public Member Functions | |
| basic_bitmap () | |
| Creates an empty bitmap. | |
| basic_bitmap (const pixel_size_type Width, const pixel_size_type Height) | |
| Creates a new bitmap with given width and height in pixels. | |
| basic_bitmap (void *Data, const pixel_size_type Width, const pixel_size_type Height) | |
| Creates a new bitmap, copying "old fashioned" C-style data. | |
| basic_bitmap (this_type &RHS) | |
| Copy constructor for bitmaps of similar type. | |
| template<typename ForeignType> | |
| basic_bitmap (basic_bitmap< ForeignType > &RHS) | |
| Copy constructor for bitmaps of dissimilar type. | |
| virtual | ~basic_bitmap () |
| Destructor. | |
| pixel_size_type | width () const |
| Returns the bitmap width in pixels. | |
| pixel_size_type | height () const |
| Returns the bitmap height in pixels. | |
| const pixel_type *const | data () const |
| Returns the raw bitmap data array. | |
| pixel_type *const | data () |
| Returns the raw bitmap data array. | |
| void | clear () |
| void | reset (const pixel_size_type Width, const pixel_size_type Height) |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
Private Attributes | |
| pixel_size_type | m_width |
| Stores the bitmap width in pixels. | |
| pixel_size_type | m_height |
| Stores the bitmap height in pixels. | |
| PixelType * | m_data |
| Stores the bitmap data as a 1D array of pixels. | |
Definition at line 528 of file kino_plugin_types.h.
|
|||||
|
Definition at line 533 of file kino_plugin_types.h. |
|
|||||
|
Definition at line 532 of file kino_plugin_types.h. |
|
|||||
|
Definition at line 531 of file kino_plugin_types.h. |
|
|||||
|
Definition at line 534 of file kino_plugin_types.h. |
|
|||||||||
|
Creates an empty bitmap.
Definition at line 537 of file kino_plugin_types.h.
|
|
||||||||||||||||
|
Creates a new bitmap with given width and height in pixels.
Definition at line 545 of file kino_plugin_types.h. References kino::basic_bitmap< PixelType >::m_data, kino::basic_bitmap< PixelType >::m_height, and kino::basic_bitmap< PixelType >::m_width. 00545 : 00546 m_width(Width), 00547 m_height(Height), 00548 m_data(static_cast<pixel_type*>(std::malloc(m_width * m_height * sizeof(pixel_type)))) 00549 { 00550 // Sanity checks ... 00551 assert(m_width); 00552 assert(m_height); 00553 assert(m_data); 00554 }
|
|
||||||||||||||||||||
|
Creates a new bitmap, copying "old fashioned" C-style data.
Definition at line 557 of file kino_plugin_types.h. References kino::basic_bitmap< PixelType >::m_data, kino::basic_bitmap< PixelType >::m_height, and kino::basic_bitmap< PixelType >::m_width. 00557 : 00558 m_width(Width), 00559 m_height(Height), 00560 m_data(static_cast<pixel_type*>(std::malloc(m_width * m_height * sizeof(pixel_type)))) 00561 { 00562 // Sanity checks ... 00563 assert(m_width); 00564 assert(m_height); 00565 assert(m_data); 00566 assert(Data); 00567 00568 memcpy(m_data, Data, m_width * m_height * sizeof(pixel_type)); 00569 }
|
|
||||||||||
|
Copy constructor for bitmaps of similar type.
Definition at line 572 of file kino_plugin_types.h. References kino::basic_bitmap< PixelType >::m_data, kino::basic_bitmap< PixelType >::m_height, and kino::basic_bitmap< PixelType >::m_width. 00572 : 00573 m_width(RHS.m_width), 00574 m_height(RHS.m_height), 00575 m_data(static_cast<pixel_type*>(std::malloc(m_width * m_height * sizeof(pixel_type)))) 00576 { 00577 memcpy(m_data, RHS.m_data, m_width * m_height * sizeof(pixel_type)); 00578 }
|
|
||||||||||||||
|
Copy constructor for bitmaps of dissimilar type.
Definition at line 581 of file kino_plugin_types.h. References kino::basic_bitmap< PixelType >::data(), kino::basic_bitmap< PixelType >::m_data, kino::basic_bitmap< PixelType >::m_height, and kino::basic_bitmap< PixelType >::m_width. 00581 : 00582 m_width(RHS.width()), 00583 m_height(RHS.height()), 00584 m_data(static_cast<pixel_type*>(std::malloc(m_width * m_height * sizeof(pixel_type)))) 00585 { 00586 std::copy(RHS.data(), RHS.data() + m_width * m_height, m_data); 00587 }
|
|
|||||||||
|
Destructor.
Definition at line 590 of file kino_plugin_types.h. References kino::basic_bitmap< PixelType >::clear(). 00591 {
00592 clear();
00593 }
|
|
|||||||||
|
Definition at line 650 of file kino_plugin_types.h. References kino::basic_bitmap< PixelType >::m_data. 00651 {
00652 return m_data;
00653 }
|
|
|||||||||
|
Definition at line 645 of file kino_plugin_types.h. References kino::basic_bitmap< PixelType >::m_data. 00646 {
00647 return m_data;
00648 }
|
|
|||||||||
|
Definition at line 619 of file kino_plugin_types.h. References kino::basic_bitmap< PixelType >::m_data, kino::basic_bitmap< PixelType >::m_height, and kino::basic_bitmap< PixelType >::m_width. Referenced by kino::basic_bitmap< PixelType >::reset(), and kino::basic_bitmap< PixelType >::~basic_bitmap(). 00620 {
00621 if(m_data)
00622 std::free(m_data);
00623
00624 m_width = 0;
00625 m_height = 0;
00626 m_data = 0;
00627 }
|
|
|||||||||
|
Returns the raw bitmap data array.
Definition at line 614 of file kino_plugin_types.h. References kino::basic_bitmap< PixelType >::m_data. 00615 {
00616 return m_data;
00617 }
|
|
|||||||||
|
Returns the raw bitmap data array.
Definition at line 608 of file kino_plugin_types.h. References kino::basic_bitmap< PixelType >::m_data. Referenced by kino::basic_bitmap< PixelType >::basic_bitmap(), and kino::basic_bitmap< PixelType >::reset(). 00609 {
00610 return m_data;
00611 }
|
|
|||||||||
|
Definition at line 660 of file kino_plugin_types.h. References kino::basic_bitmap< PixelType >::m_data, kino::basic_bitmap< PixelType >::m_height, and kino::basic_bitmap< PixelType >::m_width.
|
|
|||||||||
|
Definition at line 655 of file kino_plugin_types.h. References kino::basic_bitmap< PixelType >::m_data, kino::basic_bitmap< PixelType >::m_height, and kino::basic_bitmap< PixelType >::m_width.
|
|
|||||||||
|
Returns the bitmap height in pixels.
Definition at line 602 of file kino_plugin_types.h. References kino::basic_bitmap< PixelType >::m_height. 00603 {
00604 return m_height;
00605 }
|
|
||||||||||||||||
|
Definition at line 629 of file kino_plugin_types.h. References kino::basic_bitmap< PixelType >::clear(), kino::basic_bitmap< PixelType >::data(), kino::basic_bitmap< PixelType >::m_data, kino::basic_bitmap< PixelType >::m_height, and kino::basic_bitmap< PixelType >::m_width. 00630 {
00631 // Sanity checks ...
00632 assert(Width);
00633 assert(Height);
00634
00635 pixel_type* const data = static_cast<pixel_type*>(std::malloc(Width * Height * sizeof(pixel_type)));
00636 assert(data);
00637
00638 clear();
00639
00640 m_width = Width;
00641 m_height = Height;
00642 m_data = data;
00643 }
|
|
|||||||||
|
Returns the bitmap width in pixels.
Definition at line 596 of file kino_plugin_types.h. References kino::basic_bitmap< PixelType >::m_width. 00597 {
00598 return m_width;
00599 }
|
|
|||||
|
Stores the bitmap data as a 1D array of pixels.
Definition at line 671 of file kino_plugin_types.h. Referenced by kino::basic_bitmap< PixelType >::basic_bitmap(), kino::basic_bitmap< PixelType >::begin(), kino::basic_bitmap< PixelType >::clear(), kino::basic_bitmap< PixelType >::data(), kino::basic_bitmap< PixelType >::end(), and kino::basic_bitmap< PixelType >::reset(). |
|
|||||
|
Stores the bitmap height in pixels.
Definition at line 669 of file kino_plugin_types.h. Referenced by kino::basic_bitmap< PixelType >::basic_bitmap(), kino::basic_bitmap< PixelType >::clear(), kino::basic_bitmap< PixelType >::end(), kino::basic_bitmap< PixelType >::height(), and kino::basic_bitmap< PixelType >::reset(). |
|
|||||
|
Stores the bitmap width in pixels.
Definition at line 667 of file kino_plugin_types.h. Referenced by kino::basic_bitmap< PixelType >::basic_bitmap(), kino::basic_bitmap< PixelType >::clear(), kino::basic_bitmap< PixelType >::end(), kino::basic_bitmap< PixelType >::reset(), and kino::basic_bitmap< PixelType >::width(). |
1.4.2