-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,63 @@ | ||
Class { | ||
#name : #GMTEImageMorph, | ||
#superclass : #ImageMorph, | ||
#instVars : [ | ||
'fullResolutionSprite' | ||
], | ||
#category : #'GM-TE-Core' | ||
} | ||
|
||
{ | ||
#category : #'as yet unclassified', | ||
#'squeak_changestamp' : 'Ivo Zilkenat 5/21/2024 19:58' | ||
#'squeak_changestamp' : 'TW 5/22/2024 17:16' | ||
} | ||
GMTEImageMorph >> extent: anExtent [ | ||
"override ImageMorph extent functionality. ALWAYS KEEPS RATIO" | ||
|
||
"self image: (self image scaledToSize: anExtent)." | ||
|
||
self image: (self image scaledToSize: anExtent). | ||
self image: (self fullResolutionSprite scaledToSize: anExtent). | ||
|
||
super extent: anExtent | ||
] | ||
|
||
{ | ||
#category : #accessing, | ||
#'squeak_changestamp' : 'TW 5/22/2024 17:15' | ||
} | ||
GMTEImageMorph >> fullResolutionSprite [ | ||
|
||
^ fullResolutionSprite | ||
] | ||
|
||
{ | ||
#category : #accessing, | ||
#'squeak_changestamp' : 'TW 5/22/2024 17:15' | ||
} | ||
GMTEImageMorph >> fullResolutionSprite: anObject [ | ||
|
||
fullResolutionSprite := anObject. | ||
] | ||
|
||
{ | ||
#category : #'as yet unclassified', | ||
#'squeak_changestamp' : 'Ivo Zilkenat 5/21/2024 19:43' | ||
#'squeak_changestamp' : 'TW 5/22/2024 17:16' | ||
} | ||
GMTEImageMorph >> setPlaceholderWithExtent: anExtent color: aColor [ | ||
|
||
| placeholderForm | | ||
placeholderForm := Form extent: anExtent depth: 32. | ||
placeholderForm fillColor: aColor. | ||
self fullResolutionSprite: placeholderForm. | ||
self image: placeholderForm. | ||
] | ||
|
||
{ | ||
#category : #'as yet unclassified', | ||
#'squeak_changestamp' : 'TW 5/22/2024 17:18' | ||
} | ||
GMTEImageMorph >> updateSprite: anImage [ | ||
|
||
self fullResolutionSprite: anImage. | ||
self extent: self extent | ||
] |