Color.st
changeset 3324 a4244f890bde
parent 3309 cea34469e23f
child 3396 18f99e9fc5ec
equal deleted inserted replaced
3323:a093f7005873 3324:a4244f890bde
  1136 
  1136 
  1137         "Note: It is slow to build this palette, so it should be cached for quick access."
  1137         "Note: It is slow to build this palette, so it should be cached for quick access."
  1138         "(Color colorPaletteForDepth: 16 extent: 190@60) display"
  1138         "(Color colorPaletteForDepth: 16 extent: 190@60) display"
  1139 
  1139 
  1140         | basicHue x y c startHue palette transHt vSteps transCaption grayWidth hSteps |
  1140         | basicHue x y c startHue palette transHt vSteps transCaption grayWidth hSteps |
  1141         Smalltalk isSmalltalkX ifTrue:[
  1141 
       
  1142 "/        Smalltalk isSmalltalkX ifTrue:[
  1142             palette := Image extent:chartExtent depth:24.
  1143             palette := Image extent:chartExtent depth:24.
  1143             palette photometric:#rgb.
  1144             palette photometric:#rgb.
  1144             palette data:(ByteArray new:chartExtent x * chartExtent y * 3).   
  1145             palette data:(ByteArray new:chartExtent x * chartExtent y * 3).   
  1145         ] ifFalse:[
  1146 "/        ] ifFalse:[
  1146             palette := Form extent: chartExtent depth: depth.
  1147 "/            palette := Form extent: chartExtent depth: depth.
  1147         ].
  1148 "/        ].
  1148         transCaption := "(DisplayText text: 'no color' asText textStyle: (TextConstants at: #ComicPlain)) form storeString"
  1149         transCaption := "(DisplayText text: 'no color' asText textStyle: (TextConstants at: #ComicPlain)) form storeString"
  1149                 (Form extent: 34@9 depth: 1
  1150                 (Form extent: 34@9 depth: 1
  1150                         fromArray: #(0 0 256 0 256 0 3808663859 2147483648 2491688266 2147483648 2491688266 0 2491688266 0 2466486578 0 0 0)
  1151                         fromArray: #(0 0 256 0 256 0 3808663859 2147483648 2491688266 2147483648 2491688266 0 2491688266 0 2466486578 0 0 0)
  1151                         offset: 0@0).
  1152                         offset: 0@0).
  1152         transHt := transCaption height.
  1153         transHt := transCaption height.
  5125 ! !
  5126 ! !
  5126 
  5127 
  5127 !Color class methodsFor:'documentation'!
  5128 !Color class methodsFor:'documentation'!
  5128 
  5129 
  5129 version
  5130 version
  5130     ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.160 2000-09-25 14:03:55 cg Exp $'
  5131     ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.161 2000-09-30 15:32:31 cg Exp $'
  5131 ! !
  5132 ! !
  5132 Color initialize!
  5133 Color initialize!