OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2014 Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2014 Samsung Electronics. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 AffineTransform SVGFitToViewBox::ViewBoxToViewTransform( | 72 AffineTransform SVGFitToViewBox::ViewBoxToViewTransform( |
73 const FloatRect& view_box_rect, | 73 const FloatRect& view_box_rect, |
74 SVGPreserveAspectRatio* preserve_aspect_ratio, | 74 SVGPreserveAspectRatio* preserve_aspect_ratio, |
75 float view_width, | 75 float view_width, |
76 float view_height) { | 76 float view_height) { |
77 if (!view_box_rect.Width() || !view_box_rect.Height() || !view_width || | 77 if (!view_box_rect.Width() || !view_box_rect.Height() || !view_width || |
78 !view_height) | 78 !view_height) |
79 return AffineTransform(); | 79 return AffineTransform(); |
80 | 80 |
81 return preserve_aspect_ratio->GetCTM( | 81 return preserve_aspect_ratio->ComputeTransform( |
82 view_box_rect.X(), view_box_rect.Y(), view_box_rect.Width(), | 82 view_box_rect.X(), view_box_rect.Y(), view_box_rect.Width(), |
83 view_box_rect.Height(), view_width, view_height); | 83 view_box_rect.Height(), view_width, view_height); |
84 } | 84 } |
85 | 85 |
86 bool SVGFitToViewBox::IsKnownAttribute(const QualifiedName& attr_name) { | 86 bool SVGFitToViewBox::IsKnownAttribute(const QualifiedName& attr_name) { |
87 return attr_name == SVGNames::viewBoxAttr || | 87 return attr_name == SVGNames::viewBoxAttr || |
88 attr_name == SVGNames::preserveAspectRatioAttr; | 88 attr_name == SVGNames::preserveAspectRatioAttr; |
89 } | 89 } |
90 | 90 |
91 } // namespace blink | 91 } // namespace blink |
OLD | NEW |