]> git.saurik.com Git - wxWidgets.git/blob - include/wx/rawbmp.h
Add missing samples to samples.dsw.
[wxWidgets.git] / include / wx / rawbmp.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/rawbmp.h
3 // Purpose: macros for fast, raw bitmap data access
4 // Author: Eric Kidd, Vadim Zeitlin
5 // Modified by:
6 // Created: 10.03.03
7 // RCS-ID: $Id$
8 // Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwidgets.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_RAWBMP_H_
13 #define _WX_RAWBMP_H_
14
15 #include "wx/defs.h"
16
17 #ifdef wxHAS_RAW_BITMAP
18
19 #include "wx/image.h"
20 #include "wx/bitmap.h"
21
22 // ----------------------------------------------------------------------------
23 // Abstract Pixel API
24 //
25 // We need to access our raw bitmap data (1) portably and (2) efficiently.
26 // We do this using a two-dimensional "iteration" interface. Performance
27 // is extremely important here: these functions will be called hundreds
28 // of thousands of times in a row, and even small inefficiencies will
29 // make applications seem slow.
30 //
31 // We can't always rely on inline functions, because not all compilers actually
32 // bother to inline them unless we crank the optimization levels way up.
33 // Therefore, we also provide macros to wring maximum speed out of compiler
34 // unconditionally (e.g. even in debug builds). Of course, if the performance
35 // isn't absolutely crucial for you you shouldn't be using them but the inline
36 // functions instead.
37 // ----------------------------------------------------------------------------
38
39 /*
40 Usage example:
41
42 typedef wxPixelData<wxBitmap, wxNativePixelFormat> PixelData;
43
44 wxBitmap bmp;
45 PixelData data(bmp);
46 if ( !data )
47 {
48 ... raw access to bitmap data unavailable, do something else ...
49 return;
50 }
51
52 if ( data.GetWidth() < 20 || data.GetHeight() < 20 )
53 {
54 ... complain: the bitmap it too small ...
55 return;
56 }
57
58 PixelData::Iterator p(data);
59
60 // we draw a (10, 10)-(20, 20) rect manually using the given r, g, b
61 p.Offset(data, 10, 10);
62
63 for ( int y = 0; y < 10; ++y )
64 {
65 PixelData::Iterator rowStart = p;
66
67 for ( int x = 0; x < 10; ++x, ++p )
68 {
69 p.Red() = r;
70 p.Green() = g;
71 p.Blue() = b;
72 }
73
74 p = rowStart;
75 p.OffsetY(data, 1);
76 }
77 */
78
79 /*
80 Note: we do not use WXDLLIMPEXP_CORE with classes in this file because VC++ has
81 problems with exporting inner class defined inside a specialization of a
82 template class from a DLL. Besides, as all the methods are inline it's not
83 really necessary to put them in DLL at all.
84 */
85
86 // ----------------------------------------------------------------------------
87 // wxPixelFormat
88 // ----------------------------------------------------------------------------
89
90 /*
91 wxPixelFormat is a template class describing the bitmap data format. It
92 contains the constants describing the format of pixel data, but does not
93 describe how the entire bitmap is stored (i.e. top-to-bottom,
94 bottom-to-top, ...). It is also a "traits"-like class, i.e. it only
95 contains some constants and maybe static methods but nothing more, so it
96 can be safely used without incurring any overhead as all accesses to it are
97 done at compile-time.
98
99 Current limitations: we don't support RAGABA and ARAGAB formats supported
100 by Mac OS X. If there is sufficient interest, these classes could be
101 extended to deal with them. Neither do we support alpha channel having
102 different representation from the RGB ones (happens under QNX/Photon I
103 think), but again this could be achieved with some small extra effort.
104
105 Template parameters are:
106 - type of a single pixel component
107 - size of the single pixel in bits
108 - indices of red, green and blue pixel components inside the pixel
109 - index of the alpha component or -1 if none
110 - type which can contain the full pixel value (all channels)
111 */
112
113 template <class Channel,
114 size_t Bpp, int R, int G, int B, int A = -1,
115 class Pixel = wxUint32>
116
117 struct wxPixelFormat
118 {
119 // iterator over pixels is usually of type "ChannelType *"
120 typedef Channel ChannelType;
121
122 // the type which may hold the entire pixel value
123 typedef Pixel PixelType;
124
125 // NB: using static ints initialized inside the class declaration is not
126 // portable as it doesn't work with VC++ 6, so we must use enums
127
128 // size of one pixel in bits
129 enum { BitsPerPixel = Bpp };
130
131 // size of one pixel in ChannelType units (usually bytes)
132 enum { SizePixel = Bpp / (8 * sizeof(Channel)) };
133
134 // the channels indices inside the pixel
135 enum
136 {
137 RED = R,
138 GREEN = G,
139 BLUE = B,
140 ALPHA = A
141 };
142
143 // true if we have an alpha channel (together with the other channels, this
144 // doesn't cover the case of wxImage which stores alpha separately)
145 enum { HasAlpha = A != -1 };
146 };
147
148 // some "predefined" pixel formats
149 // -------------------------------
150
151 // wxImage format is common to all platforms
152 typedef wxPixelFormat<unsigned char, 24, 0, 1, 2> wxImagePixelFormat;
153
154 // the (most common) native bitmap format without alpha support
155 #if defined(__WXMSW__)
156 // under MSW the RGB components are reversed, they're in BGR order
157 typedef wxPixelFormat<unsigned char, 24, 2, 1, 0> wxNativePixelFormat;
158
159 #define wxPIXEL_FORMAT_ALPHA 3
160 #elif defined(__WXMAC__)
161 // under Mac, first component is unused but still present, hence we use
162 // 32bpp, not 24
163 typedef wxPixelFormat<unsigned char, 32, 1, 2, 3> wxNativePixelFormat;
164
165 #define wxPIXEL_FORMAT_ALPHA 0
166 #elif defined(__WXCOCOA__)
167 // Cocoa is standard RGB or RGBA (normally it is RGBA)
168 typedef wxPixelFormat<unsigned char, 24, 0, 1, 2> wxNativePixelFormat;
169
170 #define wxPIXEL_FORMAT_ALPHA 3
171 #elif defined(__WXGTK__)
172 // Under GTK+ 2.X we use GdkPixbuf, which is standard RGB or RGBA
173 typedef wxPixelFormat<unsigned char, 24, 0, 1, 2> wxNativePixelFormat;
174
175 #define wxPIXEL_FORMAT_ALPHA 3
176 #elif defined(__WXDFB__)
177 // Under DirectFB, RGB components are reversed, they're in BGR order
178 typedef wxPixelFormat<unsigned char, 24, 2, 1, 0> wxNativePixelFormat;
179
180 #define wxPIXEL_FORMAT_ALPHA 3
181 #endif
182
183 // the (most common) native format for bitmaps with alpha channel
184 #ifdef wxPIXEL_FORMAT_ALPHA
185 typedef wxPixelFormat<unsigned char, 32,
186 wxNativePixelFormat::RED,
187 wxNativePixelFormat::GREEN,
188 wxNativePixelFormat::BLUE,
189 wxPIXEL_FORMAT_ALPHA> wxAlphaPixelFormat;
190 #endif // wxPIXEL_FORMAT_ALPHA
191
192 // we also define the (default/best) pixel format for the given class: this is
193 // used as default value for the pixel format in wxPixelIterator template
194 template <class T> struct wxPixelFormatFor;
195
196 #if wxUSE_IMAGE
197 // wxPixelFormatFor is only defined for wxImage, attempt to use it with other
198 // classes (wxBitmap...) will result in compile errors which is exactly what we
199 // want
200 template <>
201 struct wxPixelFormatFor<wxImage>
202 {
203 typedef wxImagePixelFormat Format;
204 };
205 #endif //wxUSE_IMAGE
206
207 // ----------------------------------------------------------------------------
208 // wxPixelData
209 // ----------------------------------------------------------------------------
210
211 /*
212 wxPixelDataBase is just a helper for wxPixelData: it contains things common
213 to both wxImage and wxBitmap specializations.
214 */
215 class wxPixelDataBase
216 {
217 public:
218 // origin of the rectangular region we represent
219 wxPoint GetOrigin() const { return m_ptOrigin; }
220
221 // width and height of the region we represent
222 int GetWidth() const { return m_width; }
223 int GetHeight() const { return m_height; }
224
225 wxSize GetSize() const { return wxSize(m_width, m_height); }
226
227 // the distance between two rows
228 int GetRowStride() const { return m_stride; }
229
230 // private: -- see comment in the beginning of the file
231
232 // the origin of this image inside the bigger bitmap (usually (0, 0))
233 wxPoint m_ptOrigin;
234
235 // the size of the image we address, in pixels
236 int m_width,
237 m_height;
238
239 // this parameter is the offset of the start of the (N+1)st row from the
240 // Nth one and can be different from m_bypp*width in some cases:
241 // a) the most usual one is to force 32/64 bit alignment of rows
242 // b) another one is for bottom-to-top images where it's negative
243 // c) finally, it could conceivably be 0 for the images with all
244 // lines being identical
245 int m_stride;
246
247 protected:
248 // ctor is protected because this class is only meant to be used as the
249 // base class by wxPixelData
250 wxPixelDataBase()
251 {
252 m_width =
253 m_height =
254 m_stride = 0;
255 }
256 };
257
258 /*
259 wxPixelData represents the entire bitmap data, i.e. unlike
260 wxPixelFormat (which it uses) it also stores the global bitmap
261 characteristics such as its size, inter-row separation and so on.
262
263 Because of this it can be used to move the pixel iterators (which don't
264 have enough information about the bitmap themselves). This may seem a bit
265 unnatural but must be done in this way to keep the iterator objects as
266 small as possible for maximum efficiency as otherwise they wouldn't be put
267 into the CPU registers by the compiler any more.
268
269 Implementation note: we use the standard workaround for lack of partial
270 template specialization support in VC (both 6 and 7): instead of partly
271 specializing the class Foo<T, U> for some T we introduce FooOut<T> and
272 FooIn<U> nested in it, make Foo<T, U> equivalent to FooOut<T>::FooIn<U> and
273 fully specialize FooOut.
274
275 Also note that this class doesn't have any default definition because we
276 can't really do anything without knowing the exact image class. We do
277 provide wxPixelDataBase to make it simpler to write new wxPixelData
278 specializations.
279 */
280
281 // we need to define this skeleton template to mollify VC++
282 template <class Image>
283 struct wxPixelDataOut
284 {
285 template <class PixelFormat>
286 class wxPixelDataIn
287 {
288 public:
289 class Iterator { };
290 };
291 };
292
293 #if wxUSE_IMAGE
294 // wxPixelData specialization for wxImage: this is the simplest case as we
295 // don't have to care about different pixel formats here
296 template <>
297 struct wxPixelDataOut<wxImage>
298 {
299 // NB: this is a template class even though it doesn't use its template
300 // parameter because otherwise wxPixelData couldn't compile
301 template <class dummyPixelFormat>
302 class wxPixelDataIn : public wxPixelDataBase
303 {
304 public:
305 // the type of the class we're working with
306 typedef wxImage ImageType;
307
308 // the iterator which should be used for working with data in this
309 // format
310 class Iterator
311 {
312 public:
313 // the pixel format we use
314 typedef wxImagePixelFormat PixelFormat;
315
316 // the type of the pixel components
317 typedef typename PixelFormat::ChannelType ChannelType;
318
319 // the pixel data we're working with
320 typedef
321 wxPixelDataOut<wxImage>::wxPixelDataIn<PixelFormat> PixelData;
322
323 // go back to (0, 0)
324 void Reset(const PixelData& data)
325 {
326 *this = data.GetPixels();
327 }
328
329 // creates the iterator pointing to the beginning of data
330 Iterator(PixelData& data)
331 {
332 Reset(data);
333 }
334
335 // creates the iterator initially pointing to the image origin
336 Iterator(const wxImage& image)
337 {
338 m_pRGB = image.GetData();
339
340 if ( image.HasAlpha() )
341 {
342 m_pAlpha = image.GetAlpha();
343 }
344 else // alpha is not used at all
345 {
346 m_pAlpha = NULL;
347 }
348 }
349
350 // true if the iterator is valid
351 bool IsOk() const { return m_pRGB != NULL; }
352
353
354 // navigation
355 // ----------
356
357 // advance the iterator to the next pixel, prefix version
358 Iterator& operator++()
359 {
360 m_pRGB += PixelFormat::SizePixel;
361 if ( m_pAlpha )
362 ++m_pAlpha;
363
364 return *this;
365 }
366
367 // postfix (hence less efficient -- don't use it unless you
368 // absolutely must) version
369 Iterator operator++(int)
370 {
371 Iterator p(*this);
372 ++*this;
373 return p;
374 }
375
376 // move x pixels to the right and y down
377 //
378 // note that the rows don't wrap!
379 void Offset(const PixelData& data, int x, int y)
380 {
381 m_pRGB += data.GetRowStride()*y + PixelFormat::SizePixel*x;
382 if ( m_pAlpha )
383 m_pAlpha += data.GetWidth() + x;
384 }
385
386 // move x pixels to the right (again, no row wrapping)
387 void OffsetX(const PixelData& WXUNUSED(data), int x)
388 {
389 m_pRGB += PixelFormat::SizePixel*x;
390 if ( m_pAlpha )
391 m_pAlpha += x;
392 }
393
394 // move y rows to the bottom
395 void OffsetY(const PixelData& data, int y)
396 {
397 m_pRGB += data.GetRowStride()*y;
398 if ( m_pAlpha )
399 m_pAlpha += data.GetWidth();
400 }
401
402 // go to the given position
403 void MoveTo(const PixelData& data, int x, int y)
404 {
405 Reset(data);
406 Offset(data, x, y);
407 }
408
409
410 // data access
411 // -----------
412
413 // access to individual colour components
414 ChannelType& Red() { return m_pRGB[PixelFormat::RED]; }
415 ChannelType& Green() { return m_pRGB[PixelFormat::GREEN]; }
416 ChannelType& Blue() { return m_pRGB[PixelFormat::BLUE]; }
417 ChannelType& Alpha() { return *m_pAlpha; }
418
419 // address the pixel contents directly (always RGB, without alpha)
420 //
421 // this can't be used to modify the image as assigning a 32bpp
422 // value to 24bpp pixel would overwrite an extra byte in the next
423 // pixel or beyond the end of image
424 const typename PixelFormat::PixelType& Data()
425 { return *(typename PixelFormat::PixelType *)m_pRGB; }
426
427 // private: -- see comment in the beginning of the file
428
429 // pointer into RGB buffer
430 unsigned char *m_pRGB;
431
432 // pointer into alpha buffer or NULL if alpha isn't used
433 unsigned char *m_pAlpha;
434 };
435
436 // initializes us with the data of the given image
437 wxPixelDataIn(ImageType& image) : m_image(image), m_pixels(image)
438 {
439 m_width = image.GetWidth();
440 m_height = image.GetHeight();
441 m_stride = Iterator::PixelFormat::SizePixel * m_width;
442 }
443
444 // initializes us with the given region of the specified image
445 wxPixelDataIn(ImageType& image,
446 const wxPoint& pt,
447 const wxSize& sz) : m_image(image), m_pixels(image)
448 {
449 m_stride = Iterator::PixelFormat::SizePixel * m_width;
450
451 InitRect(pt, sz);
452 }
453
454 // initializes us with the given region of the specified image
455 wxPixelDataIn(ImageType& image,
456 const wxRect& rect) : m_image(image), m_pixels(image)
457 {
458 m_stride = Iterator::PixelFormat::SizePixel * m_width;
459
460 InitRect(rect.GetPosition(), rect.GetSize());
461 }
462
463 // we evaluate to true only if we could get access to bitmap data
464 // successfully
465 operator bool() const { return m_pixels.IsOk(); }
466
467 // get the iterator pointing to the origin
468 Iterator GetPixels() const { return m_pixels; }
469
470 private:
471 void InitRect(const wxPoint& pt, const wxSize& sz)
472 {
473 m_width = sz.x;
474 m_height = sz.y;
475
476 m_ptOrigin = pt;
477 m_pixels.Offset(*this, pt.x, pt.y);
478 }
479
480 // the image we're working with
481 ImageType& m_image;
482
483 // the iterator pointing to the image origin
484 Iterator m_pixels;
485 };
486 };
487 #endif //wxUSE_IMAGE
488
489 #if wxUSE_GUI
490 // wxPixelData specialization for wxBitmap: here things are more interesting as
491 // we also have to support different pixel formats
492 template <>
493 struct wxPixelDataOut<wxBitmap>
494 {
495 template <class Format>
496 class wxPixelDataIn : public wxPixelDataBase
497 {
498 public:
499 // the type of the class we're working with
500 typedef wxBitmap ImageType;
501
502 class Iterator
503 {
504 public:
505 // the pixel format we use
506 typedef Format PixelFormat;
507
508 // the type of the pixel components
509 typedef typename PixelFormat::ChannelType ChannelType;
510
511 // the pixel data we're working with
512 typedef wxPixelDataOut<wxBitmap>::wxPixelDataIn<Format> PixelData;
513
514
515 // go back to (0, 0)
516 void Reset(const PixelData& data)
517 {
518 *this = data.GetPixels();
519 }
520
521 // initializes the iterator to point to the origin of the given
522 // pixel data
523 Iterator(PixelData& data)
524 {
525 Reset(data);
526 }
527
528 // initializes the iterator to point to the origin of the given
529 // bitmap
530 Iterator(wxBitmap& bmp, PixelData& data)
531 {
532 // using cast here is ugly but it should be safe as
533 // GetRawData() real return type should be consistent with
534 // BitsPerPixel (which is in turn defined by ChannelType) and
535 // this is the only thing we can do without making GetRawData()
536 // a template function which is undesirable
537 m_ptr = (ChannelType *)
538 bmp.GetRawData(data, PixelFormat::BitsPerPixel);
539 }
540
541 // default constructor
542 Iterator()
543 {
544 m_ptr = NULL;
545 }
546
547 // return true if this iterator is valid
548 bool IsOk() const { return m_ptr != NULL; }
549
550
551 // navigation
552 // ----------
553
554 // advance the iterator to the next pixel, prefix version
555 Iterator& operator++()
556 {
557 m_ptr += PixelFormat::SizePixel;
558
559 return *this;
560 }
561
562 // postfix (hence less efficient -- don't use it unless you
563 // absolutely must) version
564 Iterator operator++(int)
565 {
566 Iterator p(*this);
567 ++*this;
568 return p;
569 }
570
571 // move x pixels to the right and y down
572 //
573 // note that the rows don't wrap!
574 void Offset(const PixelData& data, int x, int y)
575 {
576 m_ptr += data.GetRowStride()*y + PixelFormat::SizePixel*x;
577 }
578
579 // move x pixels to the right (again, no row wrapping)
580 void OffsetX(const PixelData& WXUNUSED(data), int x)
581 {
582 m_ptr += PixelFormat::SizePixel*x;
583 }
584
585 // move y rows to the bottom
586 void OffsetY(const PixelData& data, int y)
587 {
588 m_ptr += data.GetRowStride()*y;
589 }
590
591 // go to the given position
592 void MoveTo(const PixelData& data, int x, int y)
593 {
594 Reset(data);
595 Offset(data, x, y);
596 }
597
598
599 // data access
600 // -----------
601
602 // access to invidividual colour components
603 ChannelType& Red() { return m_ptr[PixelFormat::RED]; }
604 ChannelType& Green() { return m_ptr[PixelFormat::GREEN]; }
605 ChannelType& Blue() { return m_ptr[PixelFormat::BLUE]; }
606 ChannelType& Alpha() { return m_ptr[PixelFormat::ALPHA]; }
607
608 // address the pixel contents directly
609 //
610 // warning: the format is platform dependent
611 //
612 // warning 2: assigning to Data() only works correctly for 16bpp or
613 // 32bpp formats but using it for 24bpp ones overwrites
614 // one extra byte and so can't be done
615 typename PixelFormat::PixelType& Data()
616 { return *(typename PixelFormat::PixelType *)m_ptr; }
617
618 // private: -- see comment in the beginning of the file
619
620 // for efficiency reasons this class should not have any other
621 // fields, otherwise it won't be put into a CPU register (as it
622 // should inside the inner loops) by some compilers, notably gcc
623 ChannelType *m_ptr;
624 };
625
626 // ctor associates this pointer with a bitmap and locks the bitmap for
627 // raw access, it will be unlocked only by our dtor and so these
628 // objects should normally be only created on the stack, i.e. have
629 // limited life-time
630 wxPixelDataIn(wxBitmap& bmp) : m_bmp(bmp), m_pixels(bmp, *this)
631 {
632 }
633
634 wxPixelDataIn(wxBitmap& bmp, const wxRect& rect)
635 : m_bmp(bmp), m_pixels(bmp, *this)
636 {
637 InitRect(rect.GetPosition(), rect.GetSize());
638 }
639
640 wxPixelDataIn(wxBitmap& bmp, const wxPoint& pt, const wxSize& sz)
641 : m_bmp(bmp), m_pixels(bmp, *this)
642 {
643 InitRect(pt, sz);
644 }
645
646 // we evaluate to true only if we could get access to bitmap data
647 // successfully
648 operator bool() const { return m_pixels.IsOk(); }
649
650 // get the iterator pointing to the origin
651 Iterator GetPixels() const { return m_pixels; }
652
653 // dtor unlocks the bitmap
654 ~wxPixelDataIn()
655 {
656 if ( m_pixels.IsOk() )
657 {
658 #if defined(__WXMSW__) || defined(__WXMAC__)
659 // this is a hack to mark wxBitmap as using alpha channel
660 if ( Format::HasAlpha )
661 m_bmp.UseAlpha();
662 #endif
663 m_bmp.UngetRawData(*this);
664 }
665 // else: don't call UngetRawData() if GetRawData() failed
666 }
667
668 #if WXWIN_COMPATIBILITY_2_8
669 // not needed anymore, calls to it should be simply removed
670 wxDEPRECATED_INLINE( void UseAlpha(), wxEMPTY_PARAMETER_VALUE )
671 #endif
672
673 // private: -- see comment in the beginning of the file
674
675 // the bitmap we're associated with
676 wxBitmap m_bmp;
677
678 // the iterator pointing to the image origin
679 Iterator m_pixels;
680
681 private:
682 void InitRect(const wxPoint& pt, const wxSize& sz)
683 {
684 m_pixels.Offset(*this, pt.x, pt.y);
685
686 m_ptOrigin = pt;
687 m_width = sz.x;
688 m_height = sz.y;
689 }
690 };
691 };
692
693 #endif //wxUSE_GUI
694
695 // FIXME-VC6: VC6 doesn't like typename in default template parameters while
696 // it is necessary with standard-conforming compilers, remove this
697 // #define and just use typename when we drop VC6 support
698 #if defined(__VISUALC__) && !wxCHECK_VISUALC_VERSION(7)
699 #define wxTYPENAME_IN_TEMPLATE_DEFAULT_PARAM
700 #else
701 #define wxTYPENAME_IN_TEMPLATE_DEFAULT_PARAM typename
702 #endif
703
704 template <class Image,
705 class PixelFormat = wxTYPENAME_IN_TEMPLATE_DEFAULT_PARAM
706 wxPixelFormatFor<Image>::Format >
707 class wxPixelData :
708 public wxPixelDataOut<Image>::template wxPixelDataIn<PixelFormat>
709 {
710 public:
711 typedef
712 typename wxPixelDataOut<Image>::template wxPixelDataIn<PixelFormat>
713 Base;
714
715 wxPixelData(Image& image) : Base(image) { }
716
717 wxPixelData(Image& i, const wxRect& rect) : Base(i, rect) { }
718
719 wxPixelData(Image& i, const wxPoint& pt, const wxSize& sz)
720 : Base(i, pt, sz)
721 {
722 }
723 };
724
725 // some "predefined" pixel data classes
726 #if wxUSE_IMAGE
727 typedef wxPixelData<wxImage> wxImagePixelData;
728 #endif //wxUSE_IMAGE
729 #if wxUSE_GUI
730 typedef wxPixelData<wxBitmap, wxNativePixelFormat> wxNativePixelData;
731 typedef wxPixelData<wxBitmap, wxAlphaPixelFormat> wxAlphaPixelData;
732
733 #endif //wxUSE_GUI
734
735 // ----------------------------------------------------------------------------
736 // wxPixelIterator
737 // ----------------------------------------------------------------------------
738
739 /*
740 wxPixel::Iterator represents something which points to the pixel data and
741 allows us to iterate over it. In the simplest case of wxBitmap it is,
742 indeed, just a pointer, but it can be something more complicated and,
743 moreover, you are free to specialize it for other image classes and bitmap
744 formats.
745
746 Note that although it would have been much more intuitive to have a real
747 class here instead of what we have now, this class would need two template
748 parameters, and this can't be done because we'd need compiler support for
749 partial template specialization then and neither VC6 nor VC7 provide it.
750 */
751 template < class Image, class PixelFormat = wxPixelFormatFor<Image> >
752 struct wxPixelIterator : public wxPixelData<Image, PixelFormat>::Iterator
753 {
754 };
755
756 #endif // wxHAS_RAW_BITMAP
757 #endif // _WX_RAWBMP_H_