Skip to content

Commit 2909294

Browse files
author
Mathieu Maguérès
committed
update devShadow
1 parent 53f2c19 commit 2909294

60 files changed

Lines changed: 111 additions & 102 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/Pyramid-Bloc/PyramidShadowColorCommand.class.st

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,26 @@ Class {
66

77
{ #category : #testing }
88
PyramidShadowColorCommand >> canBeUsedFor: anObject [
9-
^ (super canBeUsedFor: anObject) and: [
10-
anObject effect isKindOf: BlShadowEffect ]
9+
10+
^ (super canBeUsedFor: anObject) and: [
11+
anObject effect class = BlSimpleShadowEffect or: [
12+
anObject effect class = BlGaussianShadowEffect ] ]
1113
]
1214

1315
{ #category : #accessing }
1416
PyramidShadowColorCommand >> getValueFor: aBlElement [
1517

16-
(aBlElement effect isKindOf: BlShadowEffect)
18+
(aBlElement effect class = BlSimpleShadowEffect or: [aBlElement effect class = BlGaussianShadowEffect])
1719
ifTrue: [ ^ aBlElement effect color ]
18-
ifFalse: [ ^ self ]
20+
ifFalse: [ ^ nil ]
1921
]
2022

2123
{ #category : #accessing }
2224
PyramidShadowColorCommand >> setValueFor: aBlElement with: aColor [
2325

24-
(aBlElement effect isKindOf: BlShadowEffect)
26+
(aBlElement effect class = BlSimpleShadowEffect or: [aBlElement effect class= BlGaussianShadowEffect])
2527
ifTrue: [
2628
aBlElement effect: (aBlElement effect copyWithColor: aColor) ]
27-
ifFalse: [ ^ self ].
29+
ifFalse: [ ^ nil ].
2830
PyramidShadowCommand current syncFromElement: aBlElement
2931
]

src/Pyramid-Bloc/PyramidShadowGaussianWidthCommand.class.st

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,24 @@ Class {
88
PyramidShadowGaussianWidthCommand >> canBeUsedFor: anObject [
99

1010
^ (super canBeUsedFor: anObject) and: [
11-
anObject effect isKindOf: BlGaussianShadowEffect ]
11+
anObject effect class = BlGaussianShadowEffect ]
1212
]
1313

1414
{ #category : #accessing }
1515
PyramidShadowGaussianWidthCommand >> getValueFor: aBlElement [
1616

17-
^ (aBlElement effect isKindOf: BlGaussianShadowEffect) ifTrue: [aBlElement effect width] ifFalse: [ ^ self ]
17+
(aBlElement effect class = BlSimpleShadowEffect or: [
18+
aBlElement effect class = BlGaussianShadowEffect ])
19+
ifTrue: [ ^ aBlElement effect width ]
20+
ifFalse: [ ^ nil ]
1821
]
1922

2023
{ #category : #accessing }
2124
PyramidShadowGaussianWidthCommand >> setValueFor: aBlElement with: aWidth [
2225

23-
(aBlElement effect isKindOf: BlGaussianShadowEffect)
26+
(aBlElement effect class = BlSimpleShadowEffect or: [aBlElement effect class = BlGaussianShadowEffect])
2427
ifTrue: [
2528
aBlElement effect: (aBlElement effect copyWithWidth: aWidth) ]
26-
ifFalse: [ ^ self ].
29+
ifFalse: [ ^ nil ].
2730
PyramidShadowCommand current syncFromElement: aBlElement
2831
]

src/Pyramid-Bloc/PyramidShadowOffsetCommand.class.st

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,23 @@ Class {
88
PyramidShadowOffsetCommand >> canBeUsedFor: anObject [
99

1010
^ (super canBeUsedFor: anObject) and: [
11-
anObject effect isKindOf: BlShadowEffect ]
11+
anObject effect class = BlSimpleShadowEffect or: [anObject effect class = BlGaussianShadowEffect] ]
1212
]
1313

1414
{ #category : #accessing }
1515
PyramidShadowOffsetCommand >> getValueFor: aBlElement [
1616

17-
^ (aBlElement effect isKindOf: BlShadowEffect) ifTrue: [aBlElement effect offset] ifFalse: [ ^ self ]
17+
(aBlElement effect class = BlSimpleShadowEffect or: [aBlElement effect class = BlGaussianShadowEffect])
18+
ifTrue: [ ^ aBlElement effect offset ]
19+
ifFalse: [ ^ nil ]
1820
]
1921

2022
{ #category : #accessing }
2123
PyramidShadowOffsetCommand >> setValueFor: aBlElement with: aPoint [
2224

23-
(aBlElement effect isKindOf: BlShadowEffect)
24-
ifTrue: [aBlElement effect: (aBlElement effect copyWithOffset: aPoint)] ifFalse: [^ self] .
25+
(aBlElement effect class = BlSimpleShadowEffect or: [aBlElement effect class = BlGaussianShadowEffect])
26+
ifTrue: [
27+
aBlElement effect: (aBlElement effect copyWithOffset: aPoint) ]
28+
ifFalse: [ ^ nil ].
2529
PyramidShadowCommand current syncFromElement: aBlElement
2630
]

src/Pyramid-Tests/PyramidAddChildCommandTest.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ PyramidAddChildCommandTest >> command [
1212
^ PyramidAddChildCommand new
1313
]
1414

15-
{ #category : #'as yet unclassified' }
15+
{ #category : #accessing }
1616
PyramidAddChildCommandTest >> targetsCanBeUsedFor [
1717

1818
^ { BlElement new . BlElement new addChild: BlElement new; yourself }

src/Pyramid-Tests/PyramidBackgroundImageCommandTest.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ PyramidBackgroundImageCommandTest >> command [
1212
^ PyramidBackgroundImageCommand new
1313
]
1414

15-
{ #category : #'as yet unclassified' }
15+
{ #category : #accessing }
1616
PyramidBackgroundImageCommandTest >> targetContainers [
1717

1818
^ {
@@ -34,7 +34,7 @@ PyramidBackgroundImageCommandTest >> targetContainers [
3434
prop: (Smalltalk ui icons iconNamed: #pharoBig)) }
3535
]
3636

37-
{ #category : #'as yet unclassified' }
37+
{ #category : #accessing }
3838
PyramidBackgroundImageCommandTest >> targetsCannotBeUsedFor [
3939
"override if needed"
4040

src/Pyramid-Tests/PyramidBackgroundOpacityCommandTest.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ PyramidBackgroundOpacityCommandTest >> isBlBackgroundEqualityFix [
2626
^ e background == b2
2727
]
2828

29-
{ #category : #'as yet unclassified' }
29+
{ #category : #accessing }
3030
PyramidBackgroundOpacityCommandTest >> targetContainers [
3131

3232
^ {

src/Pyramid-Tests/PyramidBackgroundPaintColorCommandTest.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ PyramidBackgroundPaintColorCommandTest >> command [
1212
^ PyramidBackgroundPaintColorCommand new
1313
]
1414

15-
{ #category : #'as yet unclassified' }
15+
{ #category : #accessing }
1616
PyramidBackgroundPaintColorCommandTest >> targetContainers [
1717

1818
^ {
@@ -35,7 +35,7 @@ PyramidBackgroundPaintColorCommandTest >> targetContainers [
3535
}
3636
]
3737

38-
{ #category : #'as yet unclassified' }
38+
{ #category : #accessing }
3939
PyramidBackgroundPaintColorCommandTest >> targetsCannotBeUsedFor [
4040
"override if needed"
4141

src/Pyramid-Tests/PyramidBackgroundPaintCommandTest.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ PyramidBackgroundPaintCommandTest >> command [
1212
^ PyramidBackgroundPaintCommand new
1313
]
1414

15-
{ #category : #'as yet unclassified' }
15+
{ #category : #accessing }
1616
PyramidBackgroundPaintCommandTest >> targetContainers [
1717

1818
^ {(PyramidCommandTestContainer

src/Pyramid-Tests/PyramidBackgroundPaintLinearEndCommandTest.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ PyramidBackgroundPaintLinearEndCommandTest >> command [
1212
^ PyramidBackgroundPaintLinearEndCommand new
1313
]
1414

15-
{ #category : #'as yet unclassified' }
15+
{ #category : #accessing }
1616
PyramidBackgroundPaintLinearEndCommandTest >> targetContainers [
1717

1818
^ {
@@ -58,7 +58,7 @@ PyramidBackgroundPaintLinearEndCommandTest >> targetContainers [
5858
prop: 0 @ 0) }
5959
]
6060

61-
{ #category : #'as yet unclassified' }
61+
{ #category : #accessing }
6262
PyramidBackgroundPaintLinearEndCommandTest >> targetsCannotBeUsedFor [
6363
"override if needed"
6464

src/Pyramid-Tests/PyramidBackgroundPaintLinearStartCommandTest.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ PyramidBackgroundPaintLinearStartCommandTest >> command [
1212
^ PyramidBackgroundPaintLinearStartCommand new
1313
]
1414

15-
{ #category : #'as yet unclassified' }
15+
{ #category : #accessing }
1616
PyramidBackgroundPaintLinearStartCommandTest >> targetContainers [
1717

1818
^ {
@@ -58,7 +58,7 @@ PyramidBackgroundPaintLinearStartCommandTest >> targetContainers [
5858
prop: 0 @ 10) }
5959
]
6060

61-
{ #category : #'as yet unclassified' }
61+
{ #category : #accessing }
6262
PyramidBackgroundPaintLinearStartCommandTest >> targetsCannotBeUsedFor [
6363
"override if needed"
6464

0 commit comments

Comments
 (0)