| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com> | 2 * Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 4 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 4 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
| 5 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> | 5 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 namespace blink { | 28 namespace blink { |
| 29 | 29 |
| 30 class PLATFORM_EXPORT DistantLightSource : public LightSource { | 30 class PLATFORM_EXPORT DistantLightSource : public LightSource { |
| 31 public: | 31 public: |
| 32 static PassRefPtr<DistantLightSource> create(float azimuth, float elevation) | 32 static PassRefPtr<DistantLightSource> create(float azimuth, float elevation) |
| 33 { | 33 { |
| 34 return adoptRef(new DistantLightSource(azimuth, elevation)); | 34 return adoptRef(new DistantLightSource(azimuth, elevation)); |
| 35 } | 35 } |
| 36 | 36 |
| 37 PassRefPtr<LightSource> create(const FloatPoint3D& scale, const FloatSize& o
ffset) const override | |
| 38 { | |
| 39 return adoptRef(new DistantLightSource(m_azimuth, m_elevation)); | |
| 40 } | |
| 41 | |
| 42 float azimuth() const { return m_azimuth; } | 37 float azimuth() const { return m_azimuth; } |
| 43 float elevation() const { return m_elevation; } | 38 float elevation() const { return m_elevation; } |
| 44 | 39 |
| 45 bool setAzimuth(float) override; | 40 bool setAzimuth(float) override; |
| 46 bool setElevation(float) override; | 41 bool setElevation(float) override; |
| 47 | 42 |
| 48 TextStream& externalRepresentation(TextStream&) const override; | 43 TextStream& externalRepresentation(TextStream&) const override; |
| 49 | 44 |
| 50 private: | 45 private: |
| 51 DistantLightSource(float azimuth, float elevation) | 46 DistantLightSource(float azimuth, float elevation) |
| 52 : LightSource(LS_DISTANT) | 47 : LightSource(LS_DISTANT) |
| 53 , m_azimuth(azimuth) | 48 , m_azimuth(azimuth) |
| 54 , m_elevation(elevation) | 49 , m_elevation(elevation) |
| 55 { | 50 { |
| 56 } | 51 } |
| 57 | 52 |
| 58 float m_azimuth; | 53 float m_azimuth; |
| 59 float m_elevation; | 54 float m_elevation; |
| 60 }; | 55 }; |
| 61 | 56 |
| 62 } // namespace blink | 57 } // namespace blink |
| 63 | 58 |
| 64 #endif // DistantLightSource_h | 59 #endif // DistantLightSource_h |
| OLD | NEW |