OLD | NEW |
1 /* | 1 /* |
2 ** Copyright 2006, Google Inc. | 2 ** Copyright 2006, Google Inc. |
3 ** | 3 ** |
4 ** Licensed under the Apache License, Version 2.0 (the "License"); | 4 ** Licensed under the Apache License, Version 2.0 (the "License"); |
5 ** you may not use this file except in compliance with the License. | 5 ** you may not use this file except in compliance with the License. |
6 ** You may obtain a copy of the License at | 6 ** You may obtain a copy of the License at |
7 ** | 7 ** |
8 ** http://www.apache.org/licenses/LICENSE-2.0 | 8 ** http://www.apache.org/licenses/LICENSE-2.0 |
9 ** | 9 ** |
10 ** Unless required by applicable law or agreed to in writing, software | 10 ** Unless required by applicable law or agreed to in writing, software |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 if (paintingDisabled()) | 936 if (paintingDisabled()) |
937 return; | 937 return; |
938 | 938 |
939 SkColor c; | 939 SkColor c; |
940 if (color.isValid()) | 940 if (color.isValid()) |
941 c = color.rgb(); | 941 c = color.rgb(); |
942 else | 942 else |
943 c = SkColorSetARGB(0xFF/3, 0, 0, 0); // "std" apple shadow color. | 943 c = SkColorSetARGB(0xFF/3, 0, 0, 0); // "std" apple shadow color. |
944 SkDrawLooper* dl = new SkBlurDrawLooper(SkIntToScalar(blur), | 944 SkDrawLooper* dl = new SkBlurDrawLooper(SkIntToScalar(blur), |
945 SkIntToScalar(size.width()), | 945 SkIntToScalar(size.width()), |
946 SkIntToScalar(-size.height()), | 946 SkIntToScalar(size.height()), |
947 c); | 947 c); |
948 platformContext()->setDrawLooper(dl); | 948 platformContext()->setDrawLooper(dl); |
949 dl->unref(); | 949 dl->unref(); |
950 } | 950 } |
951 | 951 |
952 void GraphicsContext::setPlatformStrokeColor(const Color& strokecolor) | 952 void GraphicsContext::setPlatformStrokeColor(const Color& strokecolor) |
953 { | 953 { |
954 if (paintingDisabled()) | 954 if (paintingDisabled()) |
955 return; | 955 return; |
956 platformContext()->setStrokeColor(strokecolor.rgb()); | 956 platformContext()->setStrokeColor(strokecolor.rgb()); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 | 1079 |
1080 void GraphicsContext::translate(float w, float h) | 1080 void GraphicsContext::translate(float w, float h) |
1081 { | 1081 { |
1082 if (paintingDisabled()) | 1082 if (paintingDisabled()) |
1083 return; | 1083 return; |
1084 platformContext()->canvas()->translate(WebCoreFloatToSkScalar(w), | 1084 platformContext()->canvas()->translate(WebCoreFloatToSkScalar(w), |
1085 WebCoreFloatToSkScalar(h)); | 1085 WebCoreFloatToSkScalar(h)); |
1086 } | 1086 } |
1087 | 1087 |
1088 } // namespace WebCore | 1088 } // namespace WebCore |
OLD | NEW |