OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 setPathFromConvexPoints(&path, numPoints, points); | 574 setPathFromConvexPoints(&path, numPoints, points); |
575 | 575 |
576 SkPaint paint(immutableState()->fillPaint()); | 576 SkPaint paint(immutableState()->fillPaint()); |
577 paint.setAntiAlias(shouldAntialias); | 577 paint.setAntiAlias(shouldAntialias); |
578 drawPath(path, paint); | 578 drawPath(path, paint); |
579 | 579 |
580 if (strokeStyle() != NoStroke) | 580 if (strokeStyle() != NoStroke) |
581 drawPath(path, immutableState()->strokePaint()); | 581 drawPath(path, immutableState()->strokePaint()); |
582 } | 582 } |
583 | 583 |
584 // This method is only used to draw the little circles used in lists. | |
585 void GraphicsContext::drawEllipse(const IntRect& elipseRect) | |
586 { | |
587 if (paintingDisabled()) | |
588 return; | |
589 | |
590 SkRect rect = elipseRect; | |
591 drawOval(rect, immutableState()->fillPaint()); | |
592 | |
593 if (strokeStyle() != NoStroke) | |
594 drawOval(rect, immutableState()->strokePaint()); | |
595 } | |
596 | |
597 void GraphicsContext::drawFocusRing(const Path& focusRingPath, int width, int of
fset, const Color& color) | 584 void GraphicsContext::drawFocusRing(const Path& focusRingPath, int width, int of
fset, const Color& color) |
598 { | 585 { |
599 // FIXME: Implement support for offset. | 586 // FIXME: Implement support for offset. |
600 if (paintingDisabled()) | 587 if (paintingDisabled()) |
601 return; | 588 return; |
602 | 589 |
603 SkPaint paint; | 590 SkPaint paint; |
604 paint.setAntiAlias(true); | 591 paint.setAntiAlias(true); |
605 paint.setStyle(SkPaint::kStroke_Style); | 592 paint.setStyle(SkPaint::kStroke_Style); |
606 paint.setColor(color.rgb()); | 593 paint.setColor(color.rgb()); |
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1882 | 1869 |
1883 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) | 1870 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) |
1884 { | 1871 { |
1885 if (m_trackTextRegion) { | 1872 if (m_trackTextRegion) { |
1886 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); | 1873 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); |
1887 m_textRegion.join(textRect); | 1874 m_textRegion.join(textRect); |
1888 } | 1875 } |
1889 } | 1876 } |
1890 | 1877 |
1891 } | 1878 } |
OLD | NEW |