| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 public: | 33 public: |
| 34 static PassRefPtr<SkewTransformOperation> create(double angleX, double angle
Y, OperationType type) | 34 static PassRefPtr<SkewTransformOperation> create(double angleX, double angle
Y, OperationType type) |
| 35 { | 35 { |
| 36 return adoptRef(new SkewTransformOperation(angleX, angleY, type)); | 36 return adoptRef(new SkewTransformOperation(angleX, angleY, type)); |
| 37 } | 37 } |
| 38 | 38 |
| 39 double angleX() const { return m_angleX; } | 39 double angleX() const { return m_angleX; } |
| 40 double angleY() const { return m_angleY; } | 40 double angleY() const { return m_angleY; } |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 virtual bool isIdentity() const { return m_angleX == 0 && m_angleY == 0; } | 43 virtual bool isIdentity() const OVERRIDE { return !m_angleX && !m_angleY; } |
| 44 virtual OperationType type() const OVERRIDE { return m_type; } | 44 virtual OperationType type() const OVERRIDE { return m_type; } |
| 45 | 45 |
| 46 virtual bool operator==(const TransformOperation& o) const | 46 virtual bool operator==(const TransformOperation& o) const |
| 47 { | 47 { |
| 48 if (!isSameType(o)) | 48 if (!isSameType(o)) |
| 49 return false; | 49 return false; |
| 50 const SkewTransformOperation* s = static_cast<const SkewTransformOperati
on*>(&o); | 50 const SkewTransformOperation* s = static_cast<const SkewTransformOperati
on*>(&o); |
| 51 return m_angleX == s->m_angleX && m_angleY == s->m_angleY; | 51 return m_angleX == s->m_angleX && m_angleY == s->m_angleY; |
| 52 } | 52 } |
| 53 | 53 |
| 54 virtual void apply(TransformationMatrix& transform, const FloatSize&) const | 54 virtual void apply(TransformationMatrix& transform, const FloatSize&) const
OVERRIDE |
| 55 { | 55 { |
| 56 transform.skew(m_angleX, m_angleY); | 56 transform.skew(m_angleX, m_angleY); |
| 57 } | 57 } |
| 58 | 58 |
| 59 virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from,
double progress, bool blendToIdentity = false); | 59 virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from,
double progress, bool blendToIdentity = false) OVERRIDE; |
| 60 | 60 |
| 61 SkewTransformOperation(double angleX, double angleY, OperationType type) | 61 SkewTransformOperation(double angleX, double angleY, OperationType type) |
| 62 : m_angleX(angleX) | 62 : m_angleX(angleX) |
| 63 , m_angleY(angleY) | 63 , m_angleY(angleY) |
| 64 , m_type(type) | 64 , m_type(type) |
| 65 { | 65 { |
| 66 } | 66 } |
| 67 | 67 |
| 68 double m_angleX; | 68 double m_angleX; |
| 69 double m_angleY; | 69 double m_angleY; |
| 70 OperationType m_type; | 70 OperationType m_type; |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace WebCore | 73 } // namespace WebCore |
| 74 | 74 |
| 75 #endif // SkewTransformOperation_h | 75 #endif // SkewTransformOperation_h |
| OLD | NEW |