-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added simple cache for the image, added tests
- Loading branch information
Showing
20 changed files
with
106 additions
and
8 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
...ge/AnimationsEditorPropertyImageSource.class/instance/createAnimationFor.withDuration..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...nsEditor-Core.package/AnimationsEditorPropertyImageSource.class/instance/loadedSource..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
loadedSource: aFilename | ||
|
||
loadedSource := aFilename. |
6 changes: 6 additions & 0 deletions
6
...onsEditor-Core.package/AnimationsEditorPropertyImageSource.class/instance/loadedSource.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
accessing | ||
loadedSource | ||
loadedSource | ||
ifNil: [self loadedSource: self defaultTargetSource]. | ||
|
||
^ loadedSource. |
4 changes: 4 additions & 0 deletions
4
...onsEditor-Core.package/AnimationsEditorPropertyImageSource.class/instance/targetImage..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
targetImage: aForm | ||
|
||
targetImage := aForm. |
4 changes: 4 additions & 0 deletions
4
...ionsEditor-Core.package/AnimationsEditorPropertyImageSource.class/instance/targetImage.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
targetImage | ||
|
||
^ targetImage. |
4 changes: 2 additions & 2 deletions
4
...nsEditor-Core.package/AnimationsEditorPropertyImageSource.class/instance/targetSource..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
targetSource: anSource | ||
targetSource: aFilename | ||
|
||
targetSource := anSource. | ||
targetSource := aFilename. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ accessing | |
targetSource | ||
targetSource | ||
ifNil: [self targetSource: self defaultTargetSource]. | ||
|
||
^ targetSource. |
5 changes: 5 additions & 0 deletions
5
...itor-Core.package/AnimationsEditorPropertyImageSource.class/instance/updateTargetImage.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
codeGeneration | ||
updateTargetImage | ||
|
||
self targetSource == self loadedSource | ||
ifFalse: [self targetImage: (Form fromFileNamed: self targetSource)]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
7 changes: 7 additions & 0 deletions
7
...Editor-Tests.package/AnimationsEditorPropertyImageSourceTest.class/instance/dummyImage.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
as yet unclassified | ||
dummyImage | ||
^ Form | ||
extent: 4 @ 4 | ||
depth: 32 | ||
fromArray: #(4278190080 4278190080 4278190080 4278190080 4278190080 4278190080 4278190080 4278190080 4278190080 4278190080 4278190080 4278190080 4278190080 4278190080 4278190080 4278190080) | ||
offset: 0 @ 0. |
4 changes: 4 additions & 0 deletions
4
...ts.package/AnimationsEditorPropertyImageSourceTest.class/instance/propertyImageSource..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
propertyImageSource: anObject | ||
|
||
propertyImageSource := anObject. |
4 changes: 4 additions & 0 deletions
4
...sts.package/AnimationsEditorPropertyImageSourceTest.class/instance/propertyImageSource.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
propertyImageSource | ||
|
||
^ propertyImageSource. |
5 changes: 5 additions & 0 deletions
5
...tionsEditor-Tests.package/AnimationsEditorPropertyImageSourceTest.class/instance/setUp.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
as yet unclassified | ||
setUp | ||
super setUp. | ||
self propertyImageSource: AnimationsEditorPropertyImageSource new. | ||
self propertyImageSource targetDuration: 0. |
7 changes: 7 additions & 0 deletions
7
....package/AnimationsEditorPropertyImageSourceTest.class/instance/testCreateAnimationFor.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
as yet unclassified | ||
testCreateAnimationFor | ||
| imageMorph animation | | ||
imageMorph := ImageMorph new openInWorld. | ||
animation := self propertyImageSource createAnimationFor: imageMorph. | ||
self assert: (animation isKindOf: AnimAnimation). | ||
imageMorph abandon. |
3 changes: 3 additions & 0 deletions
3
...ts.package/AnimationsEditorPropertyImageSourceTest.class/instance/testInstanceCreation.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
as yet unclassified | ||
testInstanceCreation | ||
self assert: (self propertyImageSource = nil) not. |
12 changes: 12 additions & 0 deletions
12
...kage/AnimationsEditorPropertyImageSourceTest.class/instance/testPropertyAfterAnimation.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
as yet unclassified | ||
testPropertyAfterAnimation | ||
| imageMorph animation | | ||
imageMorph := ImageMorph new openInWorld. | ||
self propertyImageSource targetImage: self dummyImage. | ||
animation := self propertyImageSource createAnimationFor: imageMorph. | ||
animation register; | ||
start. | ||
|
||
(Delay forSeconds: 1) wait. | ||
self assert: (imageMorph image asString = self dummyImage asString). | ||
imageMorph abandon. |
11 changes: 11 additions & 0 deletions
11
...sEditor-Tests.package/AnimationsEditorPropertyImageSourceTest.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
"dummyImage" : "LW 6/5/2021 15:35", | ||
"propertyImageSource" : "LW 6/5/2021 15:37", | ||
"propertyImageSource:" : "LW 6/5/2021 15:34", | ||
"setUp" : "LW 6/5/2021 15:41", | ||
"testCreateAnimationFor" : "LW 6/5/2021 15:57", | ||
"testInstanceCreation" : "LW 6/5/2021 15:35", | ||
"testPropertyAfterAnimation" : "LW 6/5/2021 16:35" } } |
14 changes: 14 additions & 0 deletions
14
...mationsEditor-Tests.package/AnimationsEditorPropertyImageSourceTest.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"category" : "AnimationsEditor-Tests", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
"propertyImageSource" ], | ||
"name" : "AnimationsEditorPropertyImageSourceTest", | ||
"pools" : [ | ||
], | ||
"super" : "TestCase", | ||
"type" : "normal" } |