Color.st
changeset 6785 7babceb91298
parent 6654 57ee2fe958b9
child 6793 4eb2c49db190
equal deleted inserted replaced
6784:8272fd4450b1 6785:7babceb91298
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 "{ Package: 'stx:libview' }"
    12 "{ Package: 'stx:libview' }"
       
    13 
       
    14 "{ NameSpace: Smalltalk }"
    13 
    15 
    14 Object subclass:#Color
    16 Object subclass:#Color
    15 	instanceVariableNames:'red green blue device colorId ditherForm replacementColor
    17 	instanceVariableNames:'red green blue device colorId ditherForm replacementColor
    16 		writable'
    18 		writable'
    17 	classVariableNames:'MaxValue Cells Black White LightGrey Grey DarkGrey Pseudo0
    19 	classVariableNames:'MaxValue Cells Black White LightGrey Grey DarkGrey Pseudo0
  5400     "Modified: 7.6.1996 / 19:42:21 / cg"
  5402     "Modified: 7.6.1996 / 19:42:21 / cg"
  5401 !
  5403 !
  5402 
  5404 
  5403 deltaFrom:aColor
  5405 deltaFrom:aColor
  5404     "return the distance of the receiver from some color specified
  5406     "return the distance of the receiver from some color specified
  5405      by r/g/b values"
  5407      by r/g/b values.
       
  5408      A very questionable value;
       
  5409      basing the distance on rgb values is very bad 
       
  5410      - better do a distance in a cie color cone"
  5406 
  5411 
  5407     ^ aColor deltaFromRed:self red green:self green blue:self blue
  5412     ^ aColor deltaFromRed:self red green:self green blue:self blue
  5408 
  5413 
  5409     "
  5414     "
  5410      Color red deltaFrom:(Color blue)
  5415      Color red deltaFrom:(Color blue)
  5618 ! !
  5623 ! !
  5619 
  5624 
  5620 !Color class methodsFor:'documentation'!
  5625 !Color class methodsFor:'documentation'!
  5621 
  5626 
  5622 version
  5627 version
  5623     ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.236 2014-12-09 15:36:50 cg Exp $'
  5628     ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.237 2015-02-22 12:31:03 cg Exp $'
  5624 !
  5629 !
  5625 
  5630 
  5626 version_CVS
  5631 version_CVS
  5627     ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.236 2014-12-09 15:36:50 cg Exp $'
  5632     ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.237 2015-02-22 12:31:03 cg Exp $'
  5628 ! !
  5633 ! !
  5629 
  5634 
  5630 
  5635 
  5631 Color initialize!
  5636 Color initialize!