ImageMask.st
author Claus Gittinger <cg@exept.de>
Sat, 19 May 2018 16:21:45 +0200
changeset 8369 512cb726b5f0
parent 8186 1ca1ff27bae7
permissions -rw-r--r--
#BUGFIX by cg class: XftFontDescription::FCFontListParser changed: #listOfAvailableFonts fix LC_CTYPE to avoid ugly warning from fontconfig

"
 COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
"{ Package: 'stx:libview' }"

"{ NameSpace: Smalltalk }"

Depth1Image subclass:#ImageMask
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Graphics-Images'
!

!ImageMask class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

!

documentation
"
    instances of this class represent image masks;
    if added to an image (via #mask:), only pixels for which the
    corresponding mask pixel is 1 are drawn.

    ImageMask does not add anything new - basically, it is a Depth1Image.

    [See also:]
        Image ImageReader

    [author:]
        Claus Gittinger
"
! !

!ImageMask methodsFor:'initialization'!

initialize
    super initialize.
    bitsPerSample := #(1).
    samplesPerPixel := 1.

    "Modified: / 26-09-2017 / 17:10:18 / stefan"
! !

!ImageMask methodsFor:'private'!

colormapFromImage:anImage
    "I have no colormap"

    photometric := #blackIs0.
    ^ self

    "Created: / 18.5.1999 / 20:09:25 / cg"
! !

!ImageMask methodsFor:'queries'!

isMask
    ^ true

    "Created: 22.4.1997 / 14:12:20 / cg"
! !

!ImageMask class methodsFor:'documentation'!

version
    ^ '$Header$'
! !