pleyo.com

/src/trunk2/BAL/Implementations/Graphics/Common/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 "FloatRect.h"
00032 #include "Font.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 #include "Widget.h"
00040 
00041 typedef struct SDL_Surface PlatformGraphicsContext;
00042 
00043 class DeprecatedString;
00044 
00045 namespace WebCore {
00046 
00047     class IntPoint;
00048     class IntPointArray;
00049     class Path;
00050 
00051 #if SVG_SUPPORT
00052     class KRenderingDeviceContext;
00053 #endif
00054 }
00055 
00056 namespace BAL {
00057 
00058     class GraphicsContextPrivate;
00059     class GraphicsContextPlatformPrivate;
00060 
00061     class BCGraphicsContext : Noncopyable, public BIGraphicsContext {
00062     public:
00063         BCGraphicsContext(bool isReal);
00064         virtual ~BCGraphicsContext();
00065 
00066         PlatformGraphicsContext* platformContext() const;
00067         IMPLEMENT_BIGRAPHICSCONTEXT;
00068 
00069 #if SVG_SUPPORT
00070 #ifndef __OWB__
00071         KRenderingDeviceContext* createRenderingDeviceContext();
00072 #endif
00073 #endif
00074 
00075     private:
00076         void realDraw(BINativeImage*, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator);
00077         void realDrawTiled(BINativeImage*, const FloatRect& dstRect, const FloatPoint& srcPoint, const FloatSize& tileSize, CompositeOperator);
00078         void realDrawTiled(BINativeImage*, const FloatRect& dstRect, const FloatRect& srcRect, TileRule hRule, TileRule vRule, CompositeOperator);
00079 
00080         void drawArc(int zone, int xc, int yc, float& x0, float& y0, float x1, float y1, bool doSwap);
00081 
00082     private:
00083 
00084         int focusRingWidth() const;
00085         int focusRingOffset() const;
00086         const Vector<IntRect>& focusRingRects() const;
00087 
00088         static GraphicsContextPrivate* createGraphicsContextPrivate();
00089         static void destroyGraphicsContextPrivate(GraphicsContextPrivate*);
00090 
00091         GraphicsContextPrivate* m_common;
00092         GraphicsContextPlatformPrivate* m_data;
00093         float m_alphaLayerValue;
00094         
00095         const BTWidget* m_widget;
00096     };
00097 
00098 }
00099 #endif

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

pleyo.com
pleyo.com