00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef BCGraphicsContext_h
00028 #define BCGraphicsContext_h
00029
00030 #include "BIGraphicsContext.h"
00031 #include "BTFont.h"
00032 #include "FloatRect.h"
00033 #include "IntRect.h"
00034 #include "Pen.h"
00035 #include "TextDirection.h"
00036 #include "TextStyle.h"
00037 #include <wtf/Noncopyable.h>
00038
00039
00040 typedef struct _cairo PlatformGraphicsContext;
00041
00042 class DeprecatedString;
00043
00044 namespace WebCore {
00045
00046 class IntPoint;
00047 class IntPointArray;
00048 class Path;
00049
00050 #if SVG_SUPPORT
00051 class KRenderingDeviceContext;
00052 #endif
00053 }
00054
00055 namespace BAL {
00056
00057 class GraphicsContextPrivate;
00058 class GraphicsContextPlatformPrivate;
00059
00060 class BCGraphicsContext : Noncopyable, public BIGraphicsContext {
00061 public:
00062 BCGraphicsContext(PlatformGraphicsContext*);
00063 virtual ~BCGraphicsContext();
00064
00065 PlatformGraphicsContext* platformContext() const;
00066 IMPLEMENT_BIGRAPHICSCONTEXT;
00067 #if SVG_SUPPORT
00068 #ifndef __OWB__
00069 KRenderingDeviceContext* createRenderingDeviceContext();
00070 #endif
00071 #endif
00072
00073 private:
00074 void realDraw(BINativeImage*, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator);
00075 void realDrawTiled(BINativeImage*, const FloatRect& dstRect, const FloatPoint& srcPoint, const FloatSize& tileSize, CompositeOperator);
00076 void realDrawTiled(BINativeImage*, const FloatRect& dstRect, const FloatRect& srcRect, WebCore::TileRule hRule, WebCore::TileRule vRule, CompositeOperator);
00077
00078 private:
00079 void savePlatformState();
00080 void restorePlatformState();
00081
00082 int focusRingWidth() const;
00083 int focusRingOffset() const;
00084 const Vector<IntRect>& focusRingRects() const;
00085
00086 static GraphicsContextPrivate* createGraphicsContextPrivate();
00087 static void destroyGraphicsContextPrivate(GraphicsContextPrivate*);
00088
00089 GraphicsContextPrivate* m_common;
00090 GraphicsContextPlatformPrivate* m_data;
00091 };
00092
00093 }
00094 #endif