OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008, 2009 Google, Inc. | 3 * Copyright (C) 2008, 2009 Google, Inc. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 CGPathAddLineToPoint(shape, NULL, 6.25, 14.25); | 128 CGPathAddLineToPoint(shape, NULL, 6.25, 14.25); |
129 CGPathAddLineToPoint(shape, NULL, 10.75, 14.25); | 129 CGPathAddLineToPoint(shape, NULL, 10.75, 14.25); |
130 CGPathAddLineToPoint(shape, NULL, 10.75, 12); | 130 CGPathAddLineToPoint(shape, NULL, 10.75, 12); |
131 | 131 |
132 // Scale and translate the shape. | 132 // Scale and translate the shape. |
133 CGRect cgr = r; | 133 CGRect cgr = r; |
134 CGFloat maxX = CGRectGetMaxX(cgr); | 134 CGFloat maxX = CGRectGetMaxX(cgr); |
135 CGFloat minX = CGRectGetMinX(cgr); | 135 CGFloat minX = CGRectGetMinX(cgr); |
136 CGFloat minY = CGRectGetMinY(cgr); | 136 CGFloat minY = CGRectGetMinY(cgr); |
137 CGFloat heightScale = r.height() / kSquareSize; | 137 CGFloat heightScale = r.height() / kSquareSize; |
138 bool isRTL = o.styleRef().direction() == RTL; | 138 const bool isRTL = o.styleRef().direction() == TextDirection::Rtl; |
sashab
2016/12/07 05:40:26
here
| |
139 CGAffineTransform transform = | 139 CGAffineTransform transform = |
140 CGAffineTransformMake(heightScale, 0, // A B | 140 CGAffineTransformMake(heightScale, 0, // A B |
141 0, heightScale, // C D | 141 0, heightScale, // C D |
142 isRTL ? minX : maxX - r.height(), minY); // Tx Ty | 142 isRTL ? minX : maxX - r.height(), minY); // Tx Ty |
143 | 143 |
144 CGMutablePathRef paintPath = CGPathCreateMutable(); | 144 CGMutablePathRef paintPath = CGPathCreateMutable(); |
145 CGPathAddPath(paintPath, &transform, shape); | 145 CGPathAddPath(paintPath, &transform, shape); |
146 CGPathRelease(shape); | 146 CGPathRelease(shape); |
147 | 147 |
148 CGContextSetRGBFillColor(c, 0, 0, 0, 0.4); | 148 CGContextSetRGBFillColor(c, 0, 0, 0, 0.4); |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
802 backgroundBounds.origin.y = bounds.origin.y + (heightDiff / 2) + 1; | 802 backgroundBounds.origin.y = bounds.origin.y + (heightDiff / 2) + 1; |
803 } | 803 } |
804 | 804 |
805 LocalCurrentGraphicsContext localContext(paintInfo.context, rect); | 805 LocalCurrentGraphicsContext localContext(paintInfo.context, rect); |
806 HIThemeDrawButton(&backgroundBounds, &drawInfo, localContext.cgContext(), | 806 HIThemeDrawButton(&backgroundBounds, &drawInfo, localContext.cgContext(), |
807 kHIThemeOrientationNormal, 0); | 807 kHIThemeOrientationNormal, 0); |
808 return false; | 808 return false; |
809 } | 809 } |
810 | 810 |
811 } // namespace blink | 811 } // namespace blink |
OLD | NEW |