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 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 } | 1062 } |
1063 | 1063 |
1064 void GraphicsContext::strokeEllipse(const FloatRect& ellipse) | 1064 void GraphicsContext::strokeEllipse(const FloatRect& ellipse) |
1065 { | 1065 { |
1066 if (contextDisabled()) | 1066 if (contextDisabled()) |
1067 return; | 1067 return; |
1068 | 1068 |
1069 drawOval(ellipse, immutableState()->strokePaint()); | 1069 drawOval(ellipse, immutableState()->strokePaint()); |
1070 } | 1070 } |
1071 | 1071 |
1072 void GraphicsContext::clipRoundedRect(const FloatRoundedRect& rrect, SkRegion::O
p regionOp) | 1072 void GraphicsContext::clipRoundedRect(const FloatRoundedRect& rrect, SkRegion::O
p regionOp, AntiAliasingMode shouldAntialias) |
1073 { | 1073 { |
1074 if (contextDisabled()) | 1074 if (contextDisabled()) |
1075 return; | 1075 return; |
1076 | 1076 |
1077 if (!rrect.isRounded()) { | 1077 if (!rrect.isRounded()) { |
1078 clipRect(rrect.rect(), NotAntiAliased, regionOp); | 1078 clipRect(rrect.rect(), shouldAntialias, regionOp); |
1079 return; | 1079 return; |
1080 } | 1080 } |
1081 | 1081 |
1082 clipRRect(rrect, AntiAliased, regionOp); | 1082 clipRRect(rrect, shouldAntialias, regionOp); |
1083 } | 1083 } |
1084 | 1084 |
1085 void GraphicsContext::clipOut(const Path& pathToClip) | 1085 void GraphicsContext::clipOut(const Path& pathToClip) |
1086 { | 1086 { |
1087 if (contextDisabled()) | 1087 if (contextDisabled()) |
1088 return; | 1088 return; |
1089 | 1089 |
1090 // Use const_cast and temporarily toggle the inverse fill type instead of co
pying the path. | 1090 // Use const_cast and temporarily toggle the inverse fill type instead of co
pying the path. |
1091 SkPath& path = const_cast<SkPath&>(pathToClip.skPath()); | 1091 SkPath& path = const_cast<SkPath&>(pathToClip.skPath()); |
1092 path.toggleInverseFillType(); | 1092 path.toggleInverseFillType(); |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 static const SkPMColor colors[] = { | 1361 static const SkPMColor colors[] = { |
1362 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red | 1362 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red |
1363 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray | 1363 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray |
1364 }; | 1364 }; |
1365 | 1365 |
1366 return colors[index]; | 1366 return colors[index]; |
1367 } | 1367 } |
1368 #endif | 1368 #endif |
1369 | 1369 |
1370 } // namespace blink | 1370 } // namespace blink |
OLD | NEW |