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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 EFillSizeType sizeType() const { return static_cast<EFillSizeType>(m_sizeTyp
e); } | 81 EFillSizeType sizeType() const { return static_cast<EFillSizeType>(m_sizeTyp
e); } |
82 FillSize size() const { return FillSize(static_cast<EFillSizeType>(m_sizeTyp
e), m_sizeLength); } | 82 FillSize size() const { return FillSize(static_cast<EFillSizeType>(m_sizeTyp
e), m_sizeLength); } |
83 EMaskSourceType maskSourceType() const { return static_cast<EMaskSourceType>
(m_maskSourceType); } | 83 EMaskSourceType maskSourceType() const { return static_cast<EMaskSourceType>
(m_maskSourceType); } |
84 | 84 |
85 const FillLayer* next() const { return m_next; } | 85 const FillLayer* next() const { return m_next; } |
86 FillLayer* next() { return m_next; } | 86 FillLayer* next() { return m_next; } |
87 | 87 |
88 bool isImageSet() const { return m_imageSet; } | 88 bool isImageSet() const { return m_imageSet; } |
89 bool isXPositionSet() const { return m_xPosSet; } | 89 bool isXPositionSet() const { return m_xPosSet; } |
90 bool isYPositionSet() const { return m_yPosSet; } | 90 bool isYPositionSet() const { return m_yPosSet; } |
91 bool isBackgroundOriginSet() const { return m_backgroundOriginSet; } | 91 bool isBackgroundXOriginSet() const { return m_backgroundXOriginSet; } |
| 92 bool isBackgroundYOriginSet() const { return m_backgroundYOriginSet; } |
92 bool isAttachmentSet() const { return m_attachmentSet; } | 93 bool isAttachmentSet() const { return m_attachmentSet; } |
93 bool isClipSet() const { return m_clipSet; } | 94 bool isClipSet() const { return m_clipSet; } |
94 bool isOriginSet() const { return m_originSet; } | 95 bool isOriginSet() const { return m_originSet; } |
95 bool isRepeatXSet() const { return m_repeatXSet; } | 96 bool isRepeatXSet() const { return m_repeatXSet; } |
96 bool isRepeatYSet() const { return m_repeatYSet; } | 97 bool isRepeatYSet() const { return m_repeatYSet; } |
97 bool isCompositeSet() const { return m_compositeSet; } | 98 bool isCompositeSet() const { return m_compositeSet; } |
98 bool isBlendModeSet() const { return m_blendModeSet; } | 99 bool isBlendModeSet() const { return m_blendModeSet; } |
99 bool isSizeSet() const { return m_sizeType != SizeNone; } | 100 bool isSizeSet() const { return m_sizeType != SizeNone; } |
100 bool isMaskSourceTypeSet() const { return m_maskSourceTypeSet; } | 101 bool isMaskSourceTypeSet() const { return m_maskSourceTypeSet; } |
101 | 102 |
102 void setImage(PassRefPtr<StyleImage> i) { m_image = i; m_imageSet = true; } | 103 void setImage(PassRefPtr<StyleImage> i) { m_image = i; m_imageSet = true; } |
103 void setXPosition(Length l) { m_xPosition = l; m_xPosSet = true; } | 104 void setXPosition(Length position) { m_xPosition = position; m_xPosSet = tru
e; m_backgroundXOriginSet = false; m_backgroundXOrigin = LeftEdge; } |
104 void setYPosition(Length l) { m_yPosition = l; m_yPosSet = true; } | 105 void setYPosition(Length position) { m_yPosition = position; m_yPosSet = tru
e; m_backgroundYOriginSet = false; m_backgroundYOrigin = TopEdge; } |
105 void setBackgroundXOrigin(BackgroundEdgeOrigin o) { m_backgroundXOrigin = o;
m_backgroundOriginSet = true; } | 106 void setBackgroundXOrigin(BackgroundEdgeOrigin origin) { m_backgroundXOrigin
= origin; m_backgroundXOriginSet = true; } |
106 void setBackgroundYOrigin(BackgroundEdgeOrigin o) { m_backgroundYOrigin = o;
m_backgroundOriginSet = true; } | 107 void setBackgroundYOrigin(BackgroundEdgeOrigin origin) { m_backgroundYOrigin
= origin; m_backgroundYOriginSet = true; } |
107 void setAttachment(EFillAttachment attachment) { m_attachment = attachment;
m_attachmentSet = true; } | 108 void setAttachment(EFillAttachment attachment) { m_attachment = attachment;
m_attachmentSet = true; } |
108 void setClip(EFillBox b) { m_clip = b; m_clipSet = true; } | 109 void setClip(EFillBox b) { m_clip = b; m_clipSet = true; } |
109 void setOrigin(EFillBox b) { m_origin = b; m_originSet = true; } | 110 void setOrigin(EFillBox b) { m_origin = b; m_originSet = true; } |
110 void setRepeatX(EFillRepeat r) { m_repeatX = r; m_repeatXSet = true; } | 111 void setRepeatX(EFillRepeat r) { m_repeatX = r; m_repeatXSet = true; } |
111 void setRepeatY(EFillRepeat r) { m_repeatY = r; m_repeatYSet = true; } | 112 void setRepeatY(EFillRepeat r) { m_repeatY = r; m_repeatYSet = true; } |
112 void setComposite(CompositeOperator c) { m_composite = c; m_compositeSet = t
rue; } | 113 void setComposite(CompositeOperator c) { m_composite = c; m_compositeSet = t
rue; } |
113 void setBlendMode(BlendMode b) { m_blendMode = b; m_blendModeSet = true; } | 114 void setBlendMode(BlendMode b) { m_blendMode = b; m_blendModeSet = true; } |
114 void setSizeType(EFillSizeType b) { m_sizeType = b; } | 115 void setSizeType(EFillSizeType b) { m_sizeType = b; } |
115 void setSizeLength(LengthSize l) { m_sizeLength = l; } | 116 void setSizeLength(LengthSize l) { m_sizeLength = l; } |
116 void setSize(FillSize f) { m_sizeType = f.type; m_sizeLength = f.size; } | 117 void setSize(FillSize f) { m_sizeType = f.type; m_sizeLength = f.size; } |
117 void setMaskSourceType(EMaskSourceType m) { m_maskSourceType = m; m_maskSour
ceTypeSet = true; } | 118 void setMaskSourceType(EMaskSourceType m) { m_maskSourceType = m; m_maskSour
ceTypeSet = true; } |
118 | 119 |
119 void clearImage() { m_image.clear(); m_imageSet = false; } | 120 void clearImage() { m_image.clear(); m_imageSet = false; } |
120 void clearXPosition() | 121 void clearXPosition() |
121 { | 122 { |
122 m_xPosSet = false; | 123 m_xPosSet = false; |
123 m_backgroundOriginSet = false; | 124 m_backgroundXOriginSet = false; |
124 } | 125 } |
125 void clearYPosition() | 126 void clearYPosition() |
126 { | 127 { |
127 m_yPosSet = false; | 128 m_yPosSet = false; |
128 m_backgroundOriginSet = false; | 129 m_backgroundYOriginSet = false; |
129 } | 130 } |
130 | 131 |
131 void clearAttachment() { m_attachmentSet = false; } | 132 void clearAttachment() { m_attachmentSet = false; } |
132 void clearClip() { m_clipSet = false; } | 133 void clearClip() { m_clipSet = false; } |
133 void clearOrigin() { m_originSet = false; } | 134 void clearOrigin() { m_originSet = false; } |
134 void clearRepeatX() { m_repeatXSet = false; } | 135 void clearRepeatX() { m_repeatXSet = false; } |
135 void clearRepeatY() { m_repeatYSet = false; } | 136 void clearRepeatY() { m_repeatYSet = false; } |
136 void clearComposite() { m_compositeSet = false; } | 137 void clearComposite() { m_compositeSet = false; } |
137 void clearBlendMode() { m_blendModeSet = false; } | 138 void clearBlendMode() { m_blendModeSet = false; } |
138 void clearSize() { m_sizeType = SizeNone; } | 139 void clearSize() { m_sizeType = SizeNone; } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 209 |
209 unsigned m_attachment : 2; // EFillAttachment | 210 unsigned m_attachment : 2; // EFillAttachment |
210 unsigned m_clip : 2; // EFillBox | 211 unsigned m_clip : 2; // EFillBox |
211 unsigned m_origin : 2; // EFillBox | 212 unsigned m_origin : 2; // EFillBox |
212 unsigned m_repeatX : 3; // EFillRepeat | 213 unsigned m_repeatX : 3; // EFillRepeat |
213 unsigned m_repeatY : 3; // EFillRepeat | 214 unsigned m_repeatY : 3; // EFillRepeat |
214 unsigned m_composite : 4; // CompositeOperator | 215 unsigned m_composite : 4; // CompositeOperator |
215 unsigned m_sizeType : 2; // EFillSizeType | 216 unsigned m_sizeType : 2; // EFillSizeType |
216 unsigned m_blendMode : 5; // BlendMode | 217 unsigned m_blendMode : 5; // BlendMode |
217 unsigned m_maskSourceType : 1; // EMaskSourceType | 218 unsigned m_maskSourceType : 1; // EMaskSourceType |
| 219 unsigned m_backgroundXOrigin : 2; // BackgroundEdgeOrigin |
| 220 unsigned m_backgroundYOrigin : 2; // BackgroundEdgeOrigin |
218 | 221 |
219 unsigned m_imageSet : 1; | 222 unsigned m_imageSet : 1; |
220 unsigned m_attachmentSet : 1; | 223 unsigned m_attachmentSet : 1; |
221 unsigned m_clipSet : 1; | 224 unsigned m_clipSet : 1; |
222 unsigned m_originSet : 1; | 225 unsigned m_originSet : 1; |
223 unsigned m_repeatXSet : 1; | 226 unsigned m_repeatXSet : 1; |
224 unsigned m_repeatYSet : 1; | 227 unsigned m_repeatYSet : 1; |
225 unsigned m_xPosSet : 1; | 228 unsigned m_xPosSet : 1; |
226 unsigned m_yPosSet : 1; | 229 unsigned m_yPosSet : 1; |
227 unsigned m_backgroundOriginSet : 1; | 230 unsigned m_backgroundXOriginSet : 1; |
228 unsigned m_backgroundXOrigin : 2; // BackgroundEdgeOrigin | 231 unsigned m_backgroundYOriginSet : 1; |
229 unsigned m_backgroundYOrigin : 2; // BackgroundEdgeOrigin | |
230 unsigned m_compositeSet : 1; | 232 unsigned m_compositeSet : 1; |
231 unsigned m_blendModeSet : 1; | 233 unsigned m_blendModeSet : 1; |
232 unsigned m_maskSourceTypeSet : 1; | 234 unsigned m_maskSourceTypeSet : 1; |
233 | 235 |
234 unsigned m_type : 1; // EFillLayerType | 236 unsigned m_type : 1; // EFillLayerType |
235 | 237 |
236 mutable unsigned m_clipMax : 2; // EFillBox, maximum m_clip value from this
to bottom layer | 238 mutable unsigned m_clipMax : 2; // EFillBox, maximum m_clip value from this
to bottom layer |
237 }; | 239 }; |
238 | 240 |
239 } // namespace WebCore | 241 } // namespace WebCore |
240 | 242 |
241 #endif // FillLayer_h | 243 #endif // FillLayer_h |
OLD | NEW |