-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathPyramidShadowCommand.class.st
More file actions
61 lines (49 loc) · 1.46 KB
/
PyramidShadowCommand.class.st
File metadata and controls
61 lines (49 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Class {
#name : #PyramidShadowCommand,
#superclass : #PyramidAbstractBlocCommand,
#instVars : [
'lastSimpleShadow',
'lastGaussianShadow'
],
#classInstVars : [
'current'
],
#category : #'Pyramid-Bloc-plugin-bloc-visuals'
}
{ #category : #accessing }
PyramidShadowCommand class >> current [
current ifNil: [ current := self new ].
^ current
]
{ #category : #accessing }
PyramidShadowCommand class >> resetShadowCommand [
current := nil
]
{ #category : #accessing }
PyramidShadowCommand >> getValueFor: aBlElement [
^ aBlElement effect
]
{ #category : #accessing }
PyramidShadowCommand >> lastGaussianShadow [
^ lastGaussianShadow ifNil: [ BlGaussianShadowEffect color: Color black width: 2 offset: 2 @ 2 ]
]
{ #category : #accessing }
PyramidShadowCommand >> lastSimpleShadow [
^ lastSimpleShadow ifNil: [
BlSimpleShadowEffect color: Color black offset: 2 @ 2 ]
]
{ #category : #accessing }
PyramidShadowCommand >> setValueFor: aBlElement with: anArgument [
anArgument class = BlSimpleShadowEffect ifTrue: [
lastSimpleShadow := anArgument ].
anArgument class = BlGaussianShadowEffect ifTrue: [
lastGaussianShadow := anArgument ].
aBlElement effect: anArgument
]
{ #category : #updating }
PyramidShadowCommand >> syncFromElement: aBlElement [
aBlElement effect class = BlSimpleShadowEffect ifTrue: [
lastSimpleShadow := aBlElement effect ].
aBlElement effect class = BlGaussianShadowEffect ifTrue: [
lastGaussianShadow := aBlElement effect ]
]