OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * Copyright (C) 2013 Google Inc. All rights reserved. | 7 * Copyright (C) 2013 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 FloatRect FEOffset::mapRect(const FloatRect& rect, bool forward) | 67 FloatRect FEOffset::mapRect(const FloatRect& rect, bool forward) |
68 { | 68 { |
69 FloatRect result = rect; | 69 FloatRect result = rect; |
70 if (forward) | 70 if (forward) |
71 result.move(filter()->applyHorizontalScale(m_dx), filter()->applyVertica
lScale(m_dy)); | 71 result.move(filter()->applyHorizontalScale(m_dx), filter()->applyVertica
lScale(m_dy)); |
72 else | 72 else |
73 result.move(-filter()->applyHorizontalScale(m_dx), -filter()->applyVerti
calScale(m_dy)); | 73 result.move(-filter()->applyHorizontalScale(m_dx), -filter()->applyVerti
calScale(m_dy)); |
74 return result; | 74 return result; |
75 } | 75 } |
76 | 76 |
77 PassRefPtr<SkImageFilter> FEOffset::createImageFilter(SkiaImageFilterBuilder* bu
ilder) | 77 PassRefPtr<SkImageFilter> FEOffset::createImageFilter(SkiaImageFilterBuilder& bu
ilder) |
78 { | 78 { |
79 RefPtr<SkImageFilter> input(builder->build(inputEffect(0), operatingColorSpa
ce())); | 79 RefPtr<SkImageFilter> input(builder.build(inputEffect(0), operatingColorSpac
e())); |
80 Filter* filter = this->filter(); | 80 Filter* filter = this->filter(); |
81 SkImageFilter::CropRect cropRect = getCropRect(builder->cropOffset()); | 81 SkImageFilter::CropRect cropRect = getCropRect(builder.cropOffset()); |
82 return adoptRef(SkOffsetImageFilter::Create(SkFloatToScalar(filter->applyHor
izontalScale(m_dx)), SkFloatToScalar(filter->applyVerticalScale(m_dy)), input.ge
t(), &cropRect)); | 82 return adoptRef(SkOffsetImageFilter::Create(SkFloatToScalar(filter->applyHor
izontalScale(m_dx)), SkFloatToScalar(filter->applyVerticalScale(m_dy)), input.ge
t(), &cropRect)); |
83 } | 83 } |
84 | 84 |
85 TextStream& FEOffset::externalRepresentation(TextStream& ts, int indent) const | 85 TextStream& FEOffset::externalRepresentation(TextStream& ts, int indent) const |
86 { | 86 { |
87 writeIndent(ts, indent); | 87 writeIndent(ts, indent); |
88 ts << "[feOffset"; | 88 ts << "[feOffset"; |
89 FilterEffect::externalRepresentation(ts); | 89 FilterEffect::externalRepresentation(ts); |
90 ts << " dx=\"" << dx() << "\" dy=\"" << dy() << "\"]\n"; | 90 ts << " dx=\"" << dx() << "\" dy=\"" << dy() << "\"]\n"; |
91 inputEffect(0)->externalRepresentation(ts, indent + 1); | 91 inputEffect(0)->externalRepresentation(ts, indent + 1); |
92 return ts; | 92 return ts; |
93 } | 93 } |
94 | 94 |
95 } // namespace blink | 95 } // namespace blink |
OLD | NEW |