author | Claus Gittinger <cg@exept.de> |
Mon, 03 Apr 2017 12:10:45 +0200 | |
changeset 7992 | 449abf3b7d08 |
parent 6479 | 388fa0684b52 |
child 8122 | 24692d82a3d5 |
permissions | -rw-r--r-- |
1626 | 1 |
" |
2 |
COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
3851
34637f468b2a
also handle subclasses of ExternalBytes (Mapped..)
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
12 |
"{ Package: 'stx:libview' }" |
34637f468b2a
also handle subclasses of ExternalBytes (Mapped..)
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
13 |
|
1626 | 14 |
Depth1Image subclass:#ImageMask |
15 |
instanceVariableNames:'' |
|
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'Graphics-Images' |
|
19 |
! |
|
20 |
||
21 |
!ImageMask class methodsFor:'documentation'! |
|
22 |
||
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger |
|
26 |
All Rights Reserved |
|
27 |
||
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
||
36 |
! |
|
37 |
||
38 |
documentation |
|
39 |
" |
|
40 |
instances of this class represent image masks; |
|
41 |
if added to an image (via #mask:), only pixels for which the |
|
42 |
corresponding mask pixel is 1 are drawn. |
|
43 |
||
44 |
ImageMask does not add anything new - basically, its a depth1-image. |
|
45 |
||
46 |
[See also:] |
|
47 |
Image ImageReader |
|
48 |
||
49 |
[author:] |
|
50 |
Claus Gittinger |
|
51 |
" |
|
52 |
||
53 |
! ! |
|
54 |
||
6479
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
55 |
!ImageMask methodsFor:'initialization'! |
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
56 |
|
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
57 |
initialize |
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
58 |
super initialize. |
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
59 |
bitsPerSample := samplesPerPixel := 1. |
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
60 |
! ! |
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
61 |
|
2679
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
62 |
!ImageMask methodsFor:'private'! |
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
63 |
|
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
64 |
colormapFromImage:anImage |
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
65 |
"I have no colormap" |
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
66 |
|
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
67 |
photometric := #blackIs0. |
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
68 |
^ self |
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
69 |
|
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
70 |
"Created: / 18.5.1999 / 20:09:25 / cg" |
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
71 |
! ! |
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
72 |
|
1626 | 73 |
!ImageMask methodsFor:'queries'! |
74 |
||
75 |
isMask |
|
76 |
^ true |
|
77 |
||
78 |
"Created: 22.4.1997 / 14:12:20 / cg" |
|
79 |
! ! |
|
80 |
||
81 |
!ImageMask class methodsFor:'documentation'! |
|
82 |
||
83 |
version |
|
6479
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
84 |
^ '$Header: /cvs/stx/stx/libview/ImageMask.st,v 1.4 2014-05-23 08:17:29 stefan Exp $' |
1626 | 85 |
! ! |
6479
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
86 |