OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BackgroundImageGeometry_h | 5 #ifndef BackgroundImageGeometry_h |
6 #define BackgroundImageGeometry_h | 6 #define BackgroundImageGeometry_h |
7 | 7 |
8 #include "platform/geometry/IntPoint.h" | 8 #include "platform/geometry/IntPoint.h" |
9 #include "platform/geometry/IntRect.h" | 9 #include "platform/geometry/IntRect.h" |
10 #include "platform/geometry/IntSize.h" | 10 #include "platform/geometry/IntSize.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 void setPhaseX(int x) { m_phase.setX(x); } | 46 void setPhaseX(int x) { m_phase.setX(x); } |
47 void setPhaseY(int y) { m_phase.setY(y); } | 47 void setPhaseY(int y) { m_phase.setY(y); } |
48 | 48 |
49 void setNoRepeatX(int xOffset); | 49 void setNoRepeatX(int xOffset); |
50 void setNoRepeatY(int yOffset); | 50 void setNoRepeatY(int yOffset); |
51 | 51 |
52 void useFixedAttachment(const IntPoint& attachmentPoint); | 52 void useFixedAttachment(const IntPoint& attachmentPoint); |
53 | 53 |
54 void clip(const IntRect&); | 54 void clip(const IntRect&); |
55 | 55 |
56 void setHasNonLocalGeometry(bool hasNonLocalGeometry = true) { m_hasNonLocal
Geometry = hasNonLocalGeometry; } | 56 void setHasNonLocalGeometry() { m_hasNonLocalGeometry = true; } |
57 bool hasNonLocalGeometry() const { return m_hasNonLocalGeometry; } | 57 bool hasNonLocalGeometry() const { return m_hasNonLocalGeometry; } |
58 | 58 |
59 private: | 59 private: |
60 IntRect m_destRect; | 60 IntRect m_destRect; |
61 IntPoint m_phase; | 61 IntPoint m_phase; |
62 IntSize m_tileSize; | 62 IntSize m_tileSize; |
63 IntSize m_repeatSpacing; | 63 IntSize m_repeatSpacing; |
64 bool m_hasNonLocalGeometry; // Has background-attachment: fixed. Implies tha
t we can't always cheaply compute destRect. | 64 bool m_hasNonLocalGeometry; // Has background-attachment: fixed. Implies tha
t we can't always cheaply compute destRect. |
65 }; | 65 }; |
66 | 66 |
67 } // namespace blink | 67 } // namespace blink |
68 | 68 |
69 #endif // BackgroundImageGeometry_h | 69 #endif // BackgroundImageGeometry_h |
OLD | NEW |