- Timestamp:
- 08/15/08 13:25:16 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/BAL/WKAL/Concretizations/Graphics/Cairo/BCImageBufferCairo.h
r243 r437 34 34 #include <memory> 35 35 36 #if !PLATFORM(CG)37 #include "NotImplemented.h"38 #endif39 40 #if PLATFORM(CG)41 typedef struct CGImage* CGImageRef;42 #endif43 44 #if PLATFORM(QT)45 #include <QPixmap>46 QT_BEGIN_NAMESPACE47 class QPainter;48 QT_END_NAMESPACE49 #endif50 51 #if PLATFORM(CAIRO)52 typedef struct _cairo_surface cairo_surface_t;53 #endif54 55 36 namespace WKAL { 56 37 … … 70 51 GraphicsContext* context() const; 71 52 72 #if PLATFORM(CG)73 CGImageRef cgImage() const { return image()->getCGImageRef(); }74 #elif PLATFORM(QT)75 QPixmap* pixmap() const;76 #elif PLATFORM(CAIRO)77 cairo_surface_t* surface() const;78 #endif79 80 #if PLATFORM(CG) || PLATFORM(CAIRO) || PLATFORM(QT)81 53 Image* image() const; 82 #else83 Image* image() const { notImplemented(); return 0; }84 #endif85 54 86 55 void clearImage() { m_image.clear(); } … … 91 60 String toDataURL(const String& mimeType) const; 92 61 93 94 95 62 private: 96 63 void* m_data; … … 98 65 99 66 OwnPtr<GraphicsContext> m_context; 100 mutable OwnPtr<Image> m_image;67 mutable RefPtr<Image> m_image; 101 68 102 69 #if PLATFORM(CG) 103 70 ImageBuffer(void* imageData, const IntSize&, std::auto_ptr<GraphicsContext>); 104 71 #elif PLATFORM(QT) 105 ImageBuffer(const QPixmap &px);72 ImageBuffer(const QPixmap&); 106 73 mutable QPixmap m_pixmap; 107 74 mutable QPainter* m_painter; 108 75 #elif PLATFORM(CAIRO) 109 ImageBuffer(cairo_surface_t* surface);76 ImageBuffer(cairo_surface_t*); 110 77 mutable cairo_surface_t* m_surface; 111 78 #endif
