18e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/* 2643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 30bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch * Copyright (C) 2008-2009 Torch Mobile, Inc. 48e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 58e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Redistribution and use in source and binary forms, with or without 68e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * modification, are permitted provided that the following conditions 78e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * are met: 88e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 1. Redistributions of source code must retain the above copyright 98e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * notice, this list of conditions and the following disclaimer. 108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 2. Redistributions in binary form must reproduce the above copyright 118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * notice, this list of conditions and the following disclaimer in the 128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * documentation and/or other materials provided with the distribution. 138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 168e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 178e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 245abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306Iain Merrick * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project */ 268e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#ifndef GraphicsContext_h 288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#define GraphicsContext_h 298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 30643ca7872b450ea4efacab6188849e5aac2ba161Steve Block#include "ColorSpace.h" 318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "DashArray.h" 328e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "FloatRect.h" 33f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#include "Gradient.h" 348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "Image.h" 358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "Path.h" 36f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#include "Pattern.h" 378e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include <wtf/Noncopyable.h> 38dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block#include <wtf/PassOwnPtr.h> 398e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 402daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch#if USE(CG) 418e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projecttypedef struct CGContext PlatformGraphicsContext; 422daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch#elif USE(CAIRO) 43a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochnamespace WebCore { 44a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochclass ContextShadow; 452bde8e466a4451c7319e3a072d118917957d6554Steve Blockclass PlatformContextCairo; 46a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch} 472bde8e466a4451c7319e3a072d118917957d6554Steve Blocktypedef WebCore::PlatformContextCairo PlatformGraphicsContext; 48d0825bca7fe65beaee391d30da42e937db621564Steve Block#elif PLATFORM(OPENVG) 49d0825bca7fe65beaee391d30da42e937db621564Steve Blocknamespace WebCore { 50d0825bca7fe65beaee391d30da42e937db621564Steve Blockclass SurfaceOpenVG; 51d0825bca7fe65beaee391d30da42e937db621564Steve Block} 52d0825bca7fe65beaee391d30da42e937db621564Steve Blocktypedef class WebCore::SurfaceOpenVG PlatformGraphicsContext; 538e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#elif PLATFORM(QT) 5406ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen#include <QPainter> 55e8b154fd68f9b33be40a3590e58347f353835f5cSteve Blocknamespace WebCore { 56e8b154fd68f9b33be40a3590e58347f353835f5cSteve Blockclass ContextShadow; 57e8b154fd68f9b33be40a3590e58347f353835f5cSteve Block} 588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projecttypedef QPainter PlatformGraphicsContext; 598e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#elif PLATFORM(WX) 608e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectclass wxGCDC; 618e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectclass wxWindowDC; 628e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 63231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block// wxGraphicsContext allows us to support Path, etc. 64231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block// but on some platforms, e.g. Linux, it requires fairly 658e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project// new software. 668e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#if USE(WXGC) 678e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project// On OS X, wxGCDC is just a typedef for wxDC, so use wxDC explicitly to make 688e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project// the linker happy. 698e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#ifdef __APPLE__ 708e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class wxDC; 718e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project typedef wxDC PlatformGraphicsContext; 728e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#else 738e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project typedef wxGCDC PlatformGraphicsContext; 748e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 758e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#else 768e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project typedef wxWindowDC PlatformGraphicsContext; 778e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 787fb1198349cf58688611c0b98189560871faa49fBen Murdoch#elif USE(SKIA) 79f912b6f62505f60109e7300787c93111dbd70560Steve Block#if PLATFORM(ANDROID) 80f912b6f62505f60109e7300787c93111dbd70560Steve Blocknamespace WebCore { 81f912b6f62505f60109e7300787c93111dbd70560Steve Blockclass PlatformGraphicsContext; 82f912b6f62505f60109e7300787c93111dbd70560Steve Block} 83f912b6f62505f60109e7300787c93111dbd70560Steve Blockclass SkPaint; 84f912b6f62505f60109e7300787c93111dbd70560Steve Blockstruct SkPoint; 85f912b6f62505f60109e7300787c93111dbd70560Steve Block#else 86dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdochnamespace WebCore { 87dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdochclass PlatformContextSkia; 88dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch} 89dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdochtypedef WebCore::PlatformContextSkia PlatformGraphicsContext; 9082eeb7b660065e6e990280e6563ca7eafe4be1cdBen Murdoch#endif 91231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block#elif PLATFORM(HAIKU) 92231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Blockclass BView; 93231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Blocktypedef BView PlatformGraphicsContext; 94231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Blockstruct pattern; 95d0825bca7fe65beaee391d30da42e937db621564Steve Block#elif OS(WINCE) 960bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochtypedef struct HDC__ PlatformGraphicsContext; 978e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#else 988e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projecttypedef void PlatformGraphicsContext; 998e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 1008e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1018e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#if PLATFORM(WIN) 1022daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch#include "DIBPixelData.h" 1038e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projecttypedef struct HDC__* HDC; 1042daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch#if !USE(CG) 1058e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project// UInt8 is defined in CoreFoundation/CFBase.h 1068e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projecttypedef unsigned char UInt8; 1078e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 1088e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 1098e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#if PLATFORM(QT) && defined(Q_WS_WIN) 1118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include <windows.h> 1128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 1138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectnamespace WebCore { 1158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 116d0825bca7fe65beaee391d30da42e937db621564Steve Block#if OS(WINCE) && !PLATFORM(QT) 1170bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch class SharedBitmap; 1180bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch class SimpleFontData; 1190bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch class GlyphBuffer; 1200bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch#endif 1210bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch 1228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project const int cMisspellingLineThickness = 3; 1238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project const int cMisspellingLinePatternWidth = 4; 1248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project const int cMisspellingLinePatternGapWidth = 1; 1258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1265e2bc6953fe6923165b8a5d7679939693a1d58d6Steve Block class AffineTransform; 1275abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306Iain Merrick class DrawingBuffer; 1288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class Font; 1298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class Generator; 1308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class GraphicsContextPlatformPrivate; 1318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class ImageBuffer; 13265f03d4f644ce73618e5f4f50dd694b26f55ae12Ben Murdoch class IntRect; 133ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddbBen Murdoch class RoundedIntRect; 1348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class KURL; 1355abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306Iain Merrick class SharedGraphicsContext3D; 1368e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class TextRun; 1378e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 138f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch enum TextDrawingMode { 139f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch TextModeInvisible = 0, 140f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch TextModeFill = 1 << 0, 141f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch TextModeStroke = 1 << 1, 142f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch TextModeClip = 1 << 2 143f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch }; 144f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch typedef unsigned TextDrawingModeFlags; 145231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block 1468e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project enum StrokeStyle { 1478e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project NoStroke, 1488e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project SolidStroke, 1498e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project DottedStroke, 1508e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project DashedStroke 1518e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project }; 1528e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1538e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project enum InterpolationQuality { 1548e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project InterpolationDefault, 1558e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project InterpolationNone, 1568e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project InterpolationLow, 1578e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project InterpolationMedium, 1588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project InterpolationHigh 1598e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project }; 1608e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 161f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch struct GraphicsContextState { 162f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch GraphicsContextState() 163f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch : strokeThickness(0) 164f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch , shadowBlur(0) 1652daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch#if USE(CAIRO) 166f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch , globalAlpha(1) 167f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#endif 168f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch , textDrawingMode(TextModeFill) 169f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch , strokeColor(Color::black) 170f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch , fillColor(Color::black) 171f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch , strokeStyle(SolidStroke) 172f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch , fillRule(RULE_NONZERO) 173f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch , strokeColorSpace(ColorSpaceDeviceRGB) 174f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch , fillColorSpace(ColorSpaceDeviceRGB) 175f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch , shadowColorSpace(ColorSpaceDeviceRGB) 176f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch , compositeOperator(CompositeSourceOver) 177f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch , shouldAntialias(true) 178f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch , shouldSmoothFonts(true) 179f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch , paintingDisabled(false) 180f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch , shadowsIgnoreTransforms(false) 1812daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch#if USE(CG) 1822fc2651226baac27029e38c9d6ef883fa32084dbSteve Block // Core Graphics incorrectly renders shadows with radius > 8px (<rdar://problem/8103442>), 1832fc2651226baac27029e38c9d6ef883fa32084dbSteve Block // but we need to preserve this buggy behavior for canvas and -webkit-box-shadow. 1842fc2651226baac27029e38c9d6ef883fa32084dbSteve Block , shadowsUseLegacyRadius(false) 1852fc2651226baac27029e38c9d6ef883fa32084dbSteve Block#endif 186f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch { 187f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch } 188f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 189f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch RefPtr<Gradient> strokeGradient; 190f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch RefPtr<Pattern> strokePattern; 191f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 192f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch RefPtr<Gradient> fillGradient; 193f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch RefPtr<Pattern> fillPattern; 194f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 195f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch FloatSize shadowOffset; 196f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 197f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch float strokeThickness; 198f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch float shadowBlur; 199f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 2002daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch#if USE(CAIRO) 201f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch float globalAlpha; 202f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#endif 203f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch TextDrawingModeFlags textDrawingMode; 204f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 205f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch Color strokeColor; 206f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch Color fillColor; 207f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch Color shadowColor; 208f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 209f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch StrokeStyle strokeStyle; 210f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch WindRule fillRule; 211f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 212f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch ColorSpace strokeColorSpace; 213f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch ColorSpace fillColorSpace; 214f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch ColorSpace shadowColorSpace; 215f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 216f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch CompositeOperator compositeOperator; 217f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 218f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch bool shouldAntialias : 1; 219f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch bool shouldSmoothFonts : 1; 220f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch bool paintingDisabled : 1; 221f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch bool shadowsIgnoreTransforms : 1; 2222daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch#if USE(CG) 2232fc2651226baac27029e38c9d6ef883fa32084dbSteve Block bool shadowsUseLegacyRadius : 1; 2242fc2651226baac27029e38c9d6ef883fa32084dbSteve Block#endif 225f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch }; 226f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 227ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddbBen Murdoch class GraphicsContext { 228ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddbBen Murdoch WTF_MAKE_NONCOPYABLE(GraphicsContext); WTF_MAKE_FAST_ALLOCATED; 2298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project public: 2308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project GraphicsContext(PlatformGraphicsContext*); 2318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ~GraphicsContext(); 232231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block 233d0825bca7fe65beaee391d30da42e937db621564Steve Block#if !OS(WINCE) || PLATFORM(QT) 2348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project PlatformGraphicsContext* platformContext() const; 2350bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch#endif 236231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block 2378e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project float strokeThickness() const; 2388e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setStrokeThickness(float); 2398e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project StrokeStyle strokeStyle() const; 240cad810f21b803229eb11403f9209855525a25d57Steve Block void setStrokeStyle(StrokeStyle); 2418e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Color strokeColor() const; 2428f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian ColorSpace strokeColorSpace() const; 243643ca7872b450ea4efacab6188849e5aac2ba161Steve Block void setStrokeColor(const Color&, ColorSpace); 2448f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian 2458e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setStrokePattern(PassRefPtr<Pattern>); 2468f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian Pattern* strokePattern() const; 2478f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian 2488e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setStrokeGradient(PassRefPtr<Gradient>); 2498f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian Gradient* strokeGradient() const; 2508e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 2518e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project WindRule fillRule() const; 2528e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setFillRule(WindRule); 2538e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Color fillColor() const; 254643ca7872b450ea4efacab6188849e5aac2ba161Steve Block ColorSpace fillColorSpace() const; 255643ca7872b450ea4efacab6188849e5aac2ba161Steve Block void setFillColor(const Color&, ColorSpace); 2568f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian 2578e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setFillPattern(PassRefPtr<Pattern>); 2588f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian Pattern* fillPattern() const; 2598f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian 2608e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setFillGradient(PassRefPtr<Gradient>); 2618f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian Gradient* fillGradient() const; 2628f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian 263635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project void setShadowsIgnoreTransforms(bool); 264909b5bb7002f48ae08c3c0157f5df3ee828e5d18Derek Sollenberger bool shadowsIgnoreTransforms() const; 265635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 266635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project void setShouldAntialias(bool); 267635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project bool shouldAntialias() const; 268635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 269f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch void setShouldSmoothFonts(bool); 270f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch bool shouldSmoothFonts() const; 271f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 272f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch const GraphicsContextState& state() const; 273f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 2742daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch#if USE(CG) 275635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project void applyStrokePattern(); 276635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project void applyFillPattern(); 277f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch void drawPath(const Path&); 278f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 279f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch // Allow font smoothing (LCD antialiasing). Not part of the graphics state. 280f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch void setAllowsFontSmoothing(bool); 28181bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch 28281bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch void setIsCALayerContext(bool); 28381bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch bool isCALayerContext() const; 2842bde8e466a4451c7319e3a072d118917957d6554Steve Block 2852bde8e466a4451c7319e3a072d118917957d6554Steve Block void setIsAcceleratedContext(bool); 2862bde8e466a4451c7319e3a072d118917957d6554Steve Block bool isAcceleratedContext() const; 287635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project#endif 2888e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 289f912b6f62505f60109e7300787c93111dbd70560Steve Block#if PLATFORM(ANDROID) 2908e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // initialize a paint for filling 2918e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setupFillPaint(SkPaint*); 2928e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // initialize a paint for stroking 2938e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setupStrokePaint(SkPaint*); 2948e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // initialize a paint for a shadow, or if false is returned, the 2958e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // parameters are left untouched 2968e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool setupShadowPaint(SkPaint* paint, SkPoint* offset); 2978e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // returns true if there is a valid (non-transparent) fill color 2988e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool willFill() const; 2998e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // returns true if there is a valid (non-transparent) stroke color 3008e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool willStroke() const; 301f912b6f62505f60109e7300787c93111dbd70560Steve Block 3028e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project /** platform-specific factory method to return a bitmap graphicscontext, 3038e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project called by <canvas> when we need to draw offscreen. Caller is responsible for 3048e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project deleting the context. Use drawOffscreenContext() to draw the context's image 3058e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project onto another graphics context. 3068e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project */ 3078e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project static GraphicsContext* createOffscreenContext(int width, int height); 3088e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 3098e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 3108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void save(); 3118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void restore(); 3128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 3138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // These draw methods will do both stroking and filling. 3148f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian // FIXME: ...except drawRect(), which fills properly but always strokes 3158f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian // using a 1-pixel stroke inset from the rect borders (of the correct 3168f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian // stroke color). 3178e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void drawRect(const IntRect&); 3188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void drawLine(const IntPoint&, const IntPoint&); 3198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void drawEllipse(const IntRect&); 3208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void drawConvexPolygon(size_t numPoints, const FloatPoint*, bool shouldAntialias = false); 3218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 322f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch void fillPath(const Path&); 323f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch void strokePath(const Path&); 3248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 3258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // Arc drawing (used by border-radius in CSS) just supports stroking at the moment. 3268e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void strokeArc(const IntRect&, int startAngle, int angleSpan); 3278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 3288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void fillRect(const FloatRect&); 329643ca7872b450ea4efacab6188849e5aac2ba161Steve Block void fillRect(const FloatRect&, const Color&, ColorSpace); 3308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void fillRect(const FloatRect&, Generator&); 331643ca7872b450ea4efacab6188849e5aac2ba161Steve Block void fillRoundedRect(const IntRect&, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, const Color&, ColorSpace); 332ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddbBen Murdoch void fillRoundedRect(const RoundedIntRect&, const Color&, ColorSpace); 3332fc2651226baac27029e38c9d6ef883fa32084dbSteve Block void fillRectWithRoundedHole(const IntRect&, const RoundedIntRect& roundedHoleRect, const Color&, ColorSpace); 3348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 3358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void clearRect(const FloatRect&); 3368e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 3378e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void strokeRect(const FloatRect&, float lineWidth); 3388e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 339643ca7872b450ea4efacab6188849e5aac2ba161Steve Block void drawImage(Image*, ColorSpace styleColorSpace, const IntPoint&, CompositeOperator = CompositeSourceOver); 340643ca7872b450ea4efacab6188849e5aac2ba161Steve Block void drawImage(Image*, ColorSpace styleColorSpace, const IntRect&, CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); 341643ca7872b450ea4efacab6188849e5aac2ba161Steve Block void drawImage(Image*, ColorSpace styleColorSpace, const IntPoint& destPoint, const IntRect& srcRect, CompositeOperator = CompositeSourceOver); 342643ca7872b450ea4efacab6188849e5aac2ba161Steve Block void drawImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); 343643ca7872b450ea4efacab6188849e5aac2ba161Steve Block void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1), 3448e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); 345643ca7872b450ea4efacab6188849e5aac2ba161Steve Block void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntPoint& srcPoint, const IntSize& tileSize, 346d0825bca7fe65beaee391d30da42e937db621564Steve Block CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); 347643ca7872b450ea4efacab6188849e5aac2ba161Steve Block void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& srcRect, 3488e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Image::TileRule hRule = Image::StretchTile, Image::TileRule vRule = Image::StretchTile, 349d0825bca7fe65beaee391d30da42e937db621564Steve Block CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); 3508e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 351f486d19d62f1bc33246748b14b14a9dfa617b57fIain Merrick void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntPoint&, CompositeOperator = CompositeSourceOver); 352f486d19d62f1bc33246748b14b14a9dfa617b57fIain Merrick void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntRect&, CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); 353f486d19d62f1bc33246748b14b14a9dfa617b57fIain Merrick void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntPoint& destPoint, const IntRect& srcRect, CompositeOperator = CompositeSourceOver); 354f486d19d62f1bc33246748b14b14a9dfa617b57fIain Merrick void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); 355f486d19d62f1bc33246748b14b14a9dfa617b57fIain Merrick void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1), 356f486d19d62f1bc33246748b14b14a9dfa617b57fIain Merrick CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false); 357f486d19d62f1bc33246748b14b14a9dfa617b57fIain Merrick 3588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setImageInterpolationQuality(InterpolationQuality); 3598e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project InterpolationQuality imageInterpolationQuality() const; 3608e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 36181bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch void clip(const IntRect&); 3628e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void clip(const FloatRect&); 363ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddbBen Murdoch void addRoundedRectClip(const RoundedIntRect&); 3648e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void addInnerRoundedRectClip(const IntRect&, int thickness); 3658e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void clipOut(const IntRect&); 366ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddbBen Murdoch void clipOutRoundedRect(const RoundedIntRect&); 367f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch void clipPath(const Path&, WindRule); 3680617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen void clipConvexPolygon(size_t numPoints, const FloatPoint*, bool antialias = true); 369f486d19d62f1bc33246748b14b14a9dfa617b57fIain Merrick void clipToImageBuffer(ImageBuffer*, const FloatRect&); 3702fc2651226baac27029e38c9d6ef883fa32084dbSteve Block 3712fc2651226baac27029e38c9d6ef883fa32084dbSteve Block IntRect clipBounds() const; 3728e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 373f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch TextDrawingModeFlags textDrawingMode() const; 374f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch void setTextDrawingMode(TextDrawingModeFlags); 3758e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 37681bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch void drawText(const Font&, const TextRun&, const FloatPoint&, int from = 0, int to = -1); 37781bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch void drawEmphasisMarks(const Font&, const TextRun& , const AtomicString& mark, const FloatPoint&, int from = 0, int to = -1); 378635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project void drawBidiText(const Font&, const TextRun&, const FloatPoint&); 379e52b702893ce72ec42d7bf62c4975b4ef61067d2Victoria Lease#if PLATFORM(ANDROID) 380e52b702893ce72ec42d7bf62c4975b4ef61067d2Victoria Lease void drawHighlightForText(const Font&, const TextRun&, const FloatPoint&, int h, const Color& backgroundColor, ColorSpace, int from = 0, int to = -1, bool isActive = true); 381e52b702893ce72ec42d7bf62c4975b4ef61067d2Victoria Lease#else 38281bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch void drawHighlightForText(const Font&, const TextRun&, const FloatPoint&, int h, const Color& backgroundColor, ColorSpace, int from = 0, int to = -1); 383e52b702893ce72ec42d7bf62c4975b4ef61067d2Victoria Lease#endif 3848e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 3852daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch enum RoundingMode { 3862daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch RoundAllSides, 3872daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch RoundOriginAndDimensions 3882daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch }; 3892daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch FloatRect roundToDevicePixels(const FloatRect&, RoundingMode = RoundAllSides); 390231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block 39181bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch void drawLineForText(const FloatPoint&, float width, bool printing); 3925ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen enum TextCheckingLineStyle { 3935ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen TextCheckingSpellingLineStyle, 3945ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen TextCheckingGrammarLineStyle, 3955ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen TextCheckingReplacementLineStyle 3965ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen }; 39781bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch void drawLineForTextChecking(const FloatPoint&, float width, TextCheckingLineStyle); 398231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block 3998e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool paintingDisabled() const; 4008e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setPaintingDisabled(bool); 401231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block 4028e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool updatingControlTints() const; 4038e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setUpdatingControlTints(bool); 4048e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 4058e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void beginTransparencyLayer(float opacity); 4068e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void endTransparencyLayer(); 4078e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 408cad810f21b803229eb11403f9209855525a25d57Steve Block bool hasShadow() const; 40906ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen void setShadow(const FloatSize&, float blur, const Color&, ColorSpace); 4102fc2651226baac27029e38c9d6ef883fa32084dbSteve Block // Legacy shadow blur radius is used for canvas, and -webkit-box-shadow. 4112fc2651226baac27029e38c9d6ef883fa32084dbSteve Block // It has different treatment of radii > 8px. 4122fc2651226baac27029e38c9d6ef883fa32084dbSteve Block void setLegacyShadow(const FloatSize&, float blur, const Color&, ColorSpace); 4132fc2651226baac27029e38c9d6ef883fa32084dbSteve Block 414f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch bool getShadow(FloatSize&, float&, Color&, ColorSpace&) const; 4158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void clearShadow(); 4168e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 417d0825bca7fe65beaee391d30da42e937db621564Steve Block void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Color&); 4184576aa36e9a9671459299c7963ac95aa94beaea9Shimeng (Simon) Wang void drawFocusRing(const Path&, int width, int offset, const Color&); 4198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 4208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setLineCap(LineCap); 4218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setLineDash(const DashArray&, float dashOffset); 4228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setLineJoin(LineJoin); 4238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setMiterLimit(float); 4248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 4258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setAlpha(float); 4262daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch#if USE(CAIRO) 4278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project float getAlpha(); 4288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 4298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 4308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setCompositeOperation(CompositeOperator); 431f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch CompositeOperator compositeOperation() const; 4328e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 4338e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void clip(const Path&); 434cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block 435cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block // This clip function is used only by <canvas> code. It allows 436cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block // implementations to handle clipping on the canvas differently since 4372fc2651226baac27029e38c9d6ef883fa32084dbSteve Block // the discipline is different. 438cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block void canvasClip(const Path&); 4398e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void clipOut(const Path&); 4408e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 4418e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void scale(const FloatSize&); 4428e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void rotate(float angleInRadians); 443d0825bca7fe65beaee391d30da42e937db621564Steve Block void translate(const FloatSize& size) { translate(size.width(), size.height()); } 4448e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void translate(float x, float y); 445231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block 4468e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setURLForRect(const KURL&, const IntRect&); 4478e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 4485e2bc6953fe6923165b8a5d7679939693a1d58d6Steve Block void concatCTM(const AffineTransform&); 44981bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch void setCTM(const AffineTransform&); 4508a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block AffineTransform getCTM() const; 4518e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 452d0825bca7fe65beaee391d30da42e937db621564Steve Block#if OS(WINCE) && !PLATFORM(QT) 4530bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void setBitmap(PassRefPtr<SharedBitmap>); 4540617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen const AffineTransform& affineTransform() const; 4550617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen AffineTransform& affineTransform(); 4560bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void resetAffineTransform(); 4570bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void fillRect(const FloatRect&, const Gradient*); 4580bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void drawText(const SimpleFontData* fontData, const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const FloatPoint& point); 4590bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void drawFrameControl(const IntRect& rect, unsigned type, unsigned state); 4600bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void drawFocusRect(const IntRect& rect); 4610bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void paintTextField(const IntRect& rect, unsigned state); 4620617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen void drawBitmap(SharedBitmap*, const IntRect& dstRect, const IntRect& srcRect, ColorSpace styleColorSpace, CompositeOperator compositeOp); 4630617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen void drawBitmapPattern(SharedBitmap*, const FloatRect& tileRectIn, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect, const IntSize& origSourceSize); 4640bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void drawIcon(HICON icon, const IntRect& dstRect, UINT flags); 4650bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch HDC getWindowsContext(const IntRect&, bool supportAlphaBlend = false, bool mayCreateBitmap = true); // The passed in rect is used to create a bitmap for compositing inside transparency layers. 4660bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void releaseWindowsContext(HDC, const IntRect&, bool supportAlphaBlend = false, bool mayCreateBitmap = true); // The passed in HDC should be the one handed back by getWindowsContext. 4670bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void drawRoundCorner(bool newClip, RECT clipRect, RECT rectWin, HDC dc, int width, int height); 4680bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch#elif PLATFORM(WIN) 4698e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project GraphicsContext(HDC, bool hasAlpha = false); // FIXME: To be removed. 4708e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool inTransparencyLayer() const; 4718e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project HDC getWindowsContext(const IntRect&, bool supportAlphaBlend = true, bool mayCreateBitmap = true); // The passed in rect is used to create a bitmap for compositing inside transparency layers. 4728e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void releaseWindowsContext(HDC, const IntRect&, bool supportAlphaBlend = true, bool mayCreateBitmap = true); // The passed in HDC should be the one handed back by getWindowsContext. 4738e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 474635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project // When set to true, child windows should be rendered into this context 475635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project // rather than allowing them just to render to the screen. Defaults to 476635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project // false. 477635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project // FIXME: This is a layering violation. GraphicsContext shouldn't know 478635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project // what a "window" is. It would be much more appropriate for this flag 479635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project // to be passed as a parameter alongside the GraphicsContext, but doing 480635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project // that would require lots of changes in cross-platform code that we 481635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project // aren't sure we want to make. 482635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project void setShouldIncludeChildWindows(bool); 483635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project bool shouldIncludeChildWindows() const; 484635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 485ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddbBen Murdoch class WindowsBitmap { 486ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddbBen Murdoch WTF_MAKE_NONCOPYABLE(WindowsBitmap); 4878e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project public: 4888e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project WindowsBitmap(HDC, IntSize); 4898e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ~WindowsBitmap(); 4908e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 4918e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project HDC hdc() const { return m_hdc; } 4922daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch UInt8* buffer() const { return m_pixelData.buffer(); } 4932daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch unsigned bufferLength() const { return m_pixelData.bufferLength(); } 4942daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch const IntSize& size() const { return m_pixelData.size(); } 4952daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch unsigned bytesPerRow() const { return m_pixelData.bytesPerRow(); } 4962daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch unsigned short bitsPerPixel() const { return m_pixelData.bitsPerPixel(); } 4972daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch const DIBPixelData& windowsDIB() const { return m_pixelData; } 4988e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 4998e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project private: 5008e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project HDC m_hdc; 5018e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project HBITMAP m_bitmap; 5022daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch DIBPixelData m_pixelData; 5038e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project }; 5048e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 5058e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project WindowsBitmap* createWindowsBitmap(IntSize); 5068e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // The bitmap should be non-premultiplied. 5078e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void drawWindowsBitmap(WindowsBitmap*, const IntPoint&); 5088e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 5098e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 510d0825bca7fe65beaee391d30da42e937db621564Steve Block#if (PLATFORM(QT) && defined(Q_WS_WIN)) || (PLATFORM(WX) && OS(WINDOWS)) 5118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project HDC getWindowsContext(const IntRect&, bool supportAlphaBlend = true, bool mayCreateBitmap = true); 5128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void releaseWindowsContext(HDC, const IntRect&, bool supportAlphaBlend = true, bool mayCreateBitmap = true); 5135f1ab04193ad0130ca8204aadaceae083aca9881Feng Qian bool shouldIncludeChildWindows() const { return false; } 5148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 5158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 516643ca7872b450ea4efacab6188849e5aac2ba161Steve Block#if PLATFORM(WX) 517643ca7872b450ea4efacab6188849e5aac2ba161Steve Block bool inTransparencyLayer() const { return false; } 518643ca7872b450ea4efacab6188849e5aac2ba161Steve Block#endif 519643ca7872b450ea4efacab6188849e5aac2ba161Steve Block 5208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#if PLATFORM(QT) 5218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool inTransparencyLayer() const; 522f486d19d62f1bc33246748b14b14a9dfa617b57fIain Merrick void pushTransparencyLayerInternal(const QRect &rect, qreal opacity, QPixmap& alphaMask); 5236b70adc33054f8aee8c54d0f460458a9df11b8a5Russell Brenner void takeOwnershipOfPlatformContext(); 524a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#endif 525a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch 5262daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch#if PLATFORM(QT) || USE(CAIRO) 527e8b154fd68f9b33be40a3590e58347f353835f5cSteve Block ContextShadow* contextShadow(); 5288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 5298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 5302daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch#if USE(CAIRO) 5312bde8e466a4451c7319e3a072d118917957d6554Steve Block GraphicsContext(cairo_t*); 53281bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch#endif 53381bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch 5348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#if PLATFORM(GTK) 5358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setGdkExposeEvent(GdkEventExpose*); 536f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch GdkWindow* gdkWindow() const; 5378e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project GdkEventExpose* gdkExposeEvent() const; 5388e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 5398e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 540231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block#if PLATFORM(HAIKU) 541231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block pattern getHaikuStrokeStyle(); 542231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block#endif 543231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block 5445abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306Iain Merrick void setSharedGraphicsContext3D(SharedGraphicsContext3D*, DrawingBuffer*, const IntSize&); 545dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch void syncSoftwareCanvas(); 5465abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306Iain Merrick void markDirtyRect(const IntRect&); // Hints that a portion of the backing store is dirty. 547dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch 5488e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project private: 549f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch void platformInit(PlatformGraphicsContext*); 550f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch void platformDestroy(); 551f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 552f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#if PLATFORM(WIN) && !OS(WINCE) 553f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch void platformInit(HDC, bool hasAlpha = false); 554f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#endif 555f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 5568e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void savePlatformState(); 5578e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void restorePlatformState(); 5588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 559f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch void setPlatformTextDrawingMode(TextDrawingModeFlags); 5608e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setPlatformFont(const Font& font); 5618e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 562643ca7872b450ea4efacab6188849e5aac2ba161Steve Block void setPlatformStrokeColor(const Color&, ColorSpace); 563cad810f21b803229eb11403f9209855525a25d57Steve Block void setPlatformStrokeStyle(StrokeStyle); 5648e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setPlatformStrokeThickness(float); 5650bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void setPlatformStrokeGradient(Gradient*); 5660bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void setPlatformStrokePattern(Pattern*); 5678e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 568643ca7872b450ea4efacab6188849e5aac2ba161Steve Block void setPlatformFillColor(const Color&, ColorSpace); 5690bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void setPlatformFillGradient(Gradient*); 5700bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch void setPlatformFillPattern(Pattern*); 5718e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 572f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch void setPlatformShouldAntialias(bool); 573f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch void setPlatformShouldSmoothFonts(bool); 574635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 57506ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen void setPlatformShadow(const FloatSize&, float blur, const Color&, ColorSpace); 5768e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void clearPlatformShadow(); 5778e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 578f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch void setPlatformCompositeOperation(CompositeOperator); 579f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch 580cad810f21b803229eb11403f9209855525a25d57Steve Block static void adjustLineToPixelBoundaries(FloatPoint& p1, FloatPoint& p2, float strokeWidth, StrokeStyle); 581231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block 582f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch GraphicsContextPlatformPrivate* m_data; 5838e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 584f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch GraphicsContextState m_state; 585f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch Vector<GraphicsContextState> m_stack; 586f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch bool m_updatingControlTints; 5878e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project }; 5888e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 5898e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} // namespace WebCore 5908e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 5918e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif // GraphicsContext_h 592