author | mawalch |
Wed, 17 Jan 2018 15:30:14 +0100 | |
changeset 8254 | 456f5eb842de |
parent 8186 | 1ca1ff27bae7 |
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 |
|
8122 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
1626 | 16 |
Depth1Image subclass:#ImageMask |
17 |
instanceVariableNames:'' |
|
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Graphics-Images' |
|
21 |
! |
|
22 |
||
23 |
!ImageMask class methodsFor:'documentation'! |
|
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
||
38 |
! |
|
39 |
||
40 |
documentation |
|
41 |
" |
|
42 |
instances of this class represent image masks; |
|
8122 | 43 |
if added to an image (via #mask:), only pixels for which the |
1626 | 44 |
corresponding mask pixel is 1 are drawn. |
45 |
||
8122 | 46 |
ImageMask does not add anything new - basically, it is a Depth1Image. |
1626 | 47 |
|
48 |
[See also:] |
|
49 |
Image ImageReader |
|
50 |
||
51 |
[author:] |
|
52 |
Claus Gittinger |
|
53 |
" |
|
54 |
! ! |
|
55 |
||
6479
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
56 |
!ImageMask methodsFor:'initialization'! |
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
57 |
|
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
58 |
initialize |
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
59 |
super initialize. |
8186 | 60 |
bitsPerSample := #(1). |
61 |
samplesPerPixel := 1. |
|
62 |
||
63 |
"Modified: / 26-09-2017 / 17:10:18 / stefan" |
|
6479
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
64 |
! ! |
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
65 |
|
2679
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
66 |
!ImageMask methodsFor:'private'! |
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
67 |
|
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
68 |
colormapFromImage:anImage |
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
69 |
"I have no colormap" |
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
70 |
|
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
71 |
photometric := #blackIs0. |
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
72 |
^ self |
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
73 |
|
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
74 |
"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
|
75 |
! ! |
aaf12b43b321
imageMasks have no colorMap (and always blackIs0-photometric)
Claus Gittinger <cg@exept.de>
parents:
1626
diff
changeset
|
76 |
|
1626 | 77 |
!ImageMask methodsFor:'queries'! |
78 |
||
79 |
isMask |
|
80 |
^ true |
|
81 |
||
82 |
"Created: 22.4.1997 / 14:12:20 / cg" |
|
83 |
! ! |
|
84 |
||
85 |
!ImageMask class methodsFor:'documentation'! |
|
86 |
||
87 |
version |
|
8122 | 88 |
^ '$Header$' |
1626 | 89 |
! ! |
6479
388fa0684b52
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
3851
diff
changeset
|
90 |