OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008-2009 Torch Mobile, Inc. | 3 * Copyright (C) 2008-2009 Torch Mobile, Inc. |
4 * Copyright (C) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 m_paintState = m_paintStateStack[m_paintStateIndex].get(); | 404 m_paintState = m_paintStateStack[m_paintStateIndex].get(); |
405 m_paintState->copy(*priorPaintState); | 405 m_paintState->copy(*priorPaintState); |
406 } | 406 } |
407 } | 407 } |
408 } | 408 } |
409 | 409 |
410 void fillRectWithRoundedHole(const FloatRect&, | 410 void fillRectWithRoundedHole(const FloatRect&, |
411 const FloatRoundedRect& roundedHoleRect, | 411 const FloatRoundedRect& roundedHoleRect, |
412 const Color&); | 412 const Color&); |
413 | 413 |
| 414 // Determine whether a stroked line should be drawn using dashes. In practice, |
| 415 // we draw dashes when a dashed stroke is specified or when a dotted stroke |
| 416 // is specified but the line width is too small to draw circles. |
| 417 static bool strokeIsDashed(float width, StrokeStyle); |
| 418 |
414 const SkMetaData& metaData() const { return m_metaData; } | 419 const SkMetaData& metaData() const { return m_metaData; } |
415 | 420 |
416 // null indicates painting is contextDisabled. Never delete this object. | 421 // null indicates painting is contextDisabled. Never delete this object. |
417 PaintCanvas* m_canvas; | 422 PaintCanvas* m_canvas; |
418 | 423 |
419 PaintController& m_paintController; | 424 PaintController& m_paintController; |
420 | 425 |
421 // Paint states stack. The state controls the appearance of drawn content, so | 426 // Paint states stack. The state controls the appearance of drawn content, so |
422 // this stack enables local drawing state changes with save()/restore() calls. | 427 // this stack enables local drawing state changes with save()/restore() calls. |
423 // We do not delete from this stack to avoid memory churn. | 428 // We do not delete from this stack to avoid memory churn. |
(...skipping 19 matching lines...) Expand all Loading... |
443 | 448 |
444 float m_deviceScaleFactor; | 449 float m_deviceScaleFactor; |
445 | 450 |
446 unsigned m_printing : 1; | 451 unsigned m_printing : 1; |
447 unsigned m_hasMetaData : 1; | 452 unsigned m_hasMetaData : 1; |
448 }; | 453 }; |
449 | 454 |
450 } // namespace blink | 455 } // namespace blink |
451 | 456 |
452 #endif // GraphicsContext_h | 457 #endif // GraphicsContext_h |
OLD | NEW |