class: MultiImage
added:
#depth
#extent
#inspectorClass
for ImageInspector
--- a/MultiImage.st Tue Apr 01 14:44:58 2014 +0200
+++ b/MultiImage.st Tue Apr 08 19:21:49 2014 +0200
@@ -9,7 +9,6 @@
other person. No title to or ownership of the software is
hereby transferred.
"
-
"{ Package: 'stx:libview2' }"
Object subclass:#MultiImage
@@ -88,6 +87,16 @@
^ self
!
+inspectorClass
+ "redefined to launch an ImageInspector
+ (instead of the default InspectorView)."
+
+ (self width notNil and:[self height notNil]) ifTrue:[
+ ^ ImageInspectorView
+ ].
+ ^ super inspectorClass
+!
+
onDevice:device
images := images collect:[:eachImage | (eachImage onDevice:device) ? eachImage].
^ self
@@ -101,6 +110,14 @@
^ 0
!
+depth
+ ^ images inject:0 into:[:maxSoFar :eachImage | maxSoFar max:eachImage depth].
+!
+
+extent
+ ^ self width @ self height
+!
+
height
^ images inject:0 into:[:maxSoFar :eachImage | maxSoFar max:eachImage height].
!
@@ -116,5 +133,6 @@
!MultiImage class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/MultiImage.st,v 1.8 2005-10-05 15:40:41 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/MultiImage.st,v 1.9 2014-04-08 17:21:49 stefan Exp $'
! !
+