pleyo.com

/src/trunk2/BAL/Implementations/Graphics/Cairo/BCGraphicsContext.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2003, 2006 Apple Computer, Inc.  All rights reserved.
00003  * Copyright (C) 2007 Pleyo.  All rights reserved.
00004  * 
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  *
00014  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
00015  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00016  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00017  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
00018  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00019  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00020  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00021  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
00022  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00023  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00024  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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 //#include "BIInternationalization.h"
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

Generated on Wed Nov 21 20:04:16 2007 for Origyn Web Browser by Doxygen 1.5.3

pleyo.com
pleyo.com