| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv
ed. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "core/html/canvas/CanvasPathMethods.h" | 32 #include "core/html/canvas/CanvasPathMethods.h" |
| 33 #include "core/html/canvas/CanvasRenderingContext.h" | 33 #include "core/html/canvas/CanvasRenderingContext.h" |
| 34 #include "core/html/canvas/HitRegion.h" | 34 #include "core/html/canvas/HitRegion.h" |
| 35 #include "core/svg/SVGMatrixTearOff.h" | 35 #include "core/svg/SVGMatrixTearOff.h" |
| 36 #include "platform/fonts/Font.h" | 36 #include "platform/fonts/Font.h" |
| 37 #include "platform/graphics/Color.h" | 37 #include "platform/graphics/Color.h" |
| 38 #include "platform/geometry/FloatSize.h" | 38 #include "platform/geometry/FloatSize.h" |
| 39 #include "platform/graphics/GraphicsTypes.h" | 39 #include "platform/graphics/GraphicsTypes.h" |
| 40 #include "platform/graphics/ImageBuffer.h" | 40 #include "platform/graphics/ImageBuffer.h" |
| 41 #include "platform/graphics/Path.h" | 41 #include "platform/graphics/Path.h" |
| 42 #include "platform/text/TextDirection.h" |
| 42 #include "platform/transforms/AffineTransform.h" | 43 #include "platform/transforms/AffineTransform.h" |
| 43 #include "wtf/HashMap.h" | 44 #include "wtf/HashMap.h" |
| 44 #include "wtf/Vector.h" | 45 #include "wtf/Vector.h" |
| 45 #include "wtf/text/WTFString.h" | 46 #include "wtf/text/WTFString.h" |
| 46 | 47 |
| 47 namespace blink { class WebLayer; } | 48 namespace blink { class WebLayer; } |
| 48 | 49 |
| 49 namespace blink { | 50 namespace blink { |
| 50 | 51 |
| 51 class CanvasImageSource; | 52 class CanvasImageSource; |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 | 205 |
| 205 String font() const; | 206 String font() const; |
| 206 void setFont(const String&); | 207 void setFont(const String&); |
| 207 | 208 |
| 208 String textAlign() const; | 209 String textAlign() const; |
| 209 void setTextAlign(const String&); | 210 void setTextAlign(const String&); |
| 210 | 211 |
| 211 String textBaseline() const; | 212 String textBaseline() const; |
| 212 void setTextBaseline(const String&); | 213 void setTextBaseline(const String&); |
| 213 | 214 |
| 215 String direction() const; |
| 216 void setDirection(const String&); |
| 217 |
| 214 void fillText(const String& text, float x, float y); | 218 void fillText(const String& text, float x, float y); |
| 215 void fillText(const String& text, float x, float y, float maxWidth); | 219 void fillText(const String& text, float x, float y, float maxWidth); |
| 216 void strokeText(const String& text, float x, float y); | 220 void strokeText(const String& text, float x, float y); |
| 217 void strokeText(const String& text, float x, float y, float maxWidth); | 221 void strokeText(const String& text, float x, float y, float maxWidth); |
| 218 PassRefPtrWillBeRawPtr<TextMetrics> measureText(const String& text); | 222 PassRefPtrWillBeRawPtr<TextMetrics> measureText(const String& text); |
| 219 | 223 |
| 220 LineCap getLineCap() const { return state().m_lineCap; } | 224 LineCap getLineCap() const { return state().m_lineCap; } |
| 221 LineJoin getLineJoin() const { return state().m_lineJoin; } | 225 LineJoin getLineJoin() const { return state().m_lineJoin; } |
| 222 | 226 |
| 223 bool imageSmoothingEnabled() const; | 227 bool imageSmoothingEnabled() const; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 blink::WebBlendMode m_globalBlend; | 276 blink::WebBlendMode m_globalBlend; |
| 273 AffineTransform m_transform; | 277 AffineTransform m_transform; |
| 274 bool m_invertibleCTM; | 278 bool m_invertibleCTM; |
| 275 Vector<float> m_lineDash; | 279 Vector<float> m_lineDash; |
| 276 float m_lineDashOffset; | 280 float m_lineDashOffset; |
| 277 bool m_imageSmoothingEnabled; | 281 bool m_imageSmoothingEnabled; |
| 278 | 282 |
| 279 // Text state. | 283 // Text state. |
| 280 TextAlign m_textAlign; | 284 TextAlign m_textAlign; |
| 281 TextBaseline m_textBaseline; | 285 TextBaseline m_textBaseline; |
| 286 TextDirection m_direction; |
| 282 | 287 |
| 283 String m_unparsedFont; | 288 String m_unparsedFont; |
| 284 Font m_font; | 289 Font m_font; |
| 285 bool m_realizedFont; | 290 bool m_realizedFont; |
| 286 | 291 |
| 287 bool m_hasClip; | 292 bool m_hasClip; |
| 288 }; | 293 }; |
| 289 | 294 |
| 290 CanvasRenderingContext2D(HTMLCanvasElement*, const Canvas2DContextAttributes
* attrs, bool usesCSSCompatibilityParseMode); | 295 CanvasRenderingContext2D(HTMLCanvasElement*, const Canvas2DContextAttributes
* attrs, bool usesCSSCompatibilityParseMode); |
| 291 | 296 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; | 373 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; |
| 369 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; | 374 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; |
| 370 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; | 375 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; |
| 371 }; | 376 }; |
| 372 | 377 |
| 373 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); | 378 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); |
| 374 | 379 |
| 375 } // namespace blink | 380 } // namespace blink |
| 376 | 381 |
| 377 #endif | 382 #endif |
| OLD | NEW |