ImageEditor.st
changeset 3430 9b5190f88556
parent 3427 4c2297e8a454
child 3433 539da315be01
equal deleted inserted replaced
3429:bda211bf56ec 3430:9b5190f88556
  5063             clrIndex := aParameter.
  5063             clrIndex := aParameter.
  5064             (self hasMask) ifTrue:[
  5064             (self hasMask) ifTrue:[
  5065                 clrIndex := clrIndex - 1.
  5065                 clrIndex := clrIndex - 1.
  5066             ].
  5066             ].
  5067             changedColor := changedObject at:aParameter.
  5067             changedColor := changedObject at:aParameter.
  5068             drawingColormap notNil ifTrue:[
       
  5069                 drawingColormap at:clrIndex put:changedColor.
       
  5070             ].
       
  5071             cMap := image colorMap.
  5068             cMap := image colorMap.
  5072             (cMap notNil and:[cMap isFixedPalette not]) ifTrue:[
  5069             (cMap notNil and:[cMap isFixedPalette not]) ifTrue:[
  5073                 image colorMap at:clrIndex put:changedColor.
  5070                 image colorMap at:clrIndex put:changedColor.
  5074                 self colorMapChanged.
  5071                 self colorMapChanged.
  5075             ].
  5072             ] ifFalse:[
       
  5073                 drawingColormap notNil ifTrue:[
       
  5074                     drawingColormap size < clrIndex ifTrue:[
       
  5075                         |newDrawingColormap|
       
  5076                         
       
  5077                         newDrawingColormap := drawingColormap species new:clrIndex.
       
  5078                         newDrawingColormap replaceFrom:1 with:drawingColormap.
       
  5079                         drawingColormap := newDrawingColormap.
       
  5080                     ].    
       
  5081                     drawingColormap at:clrIndex put:changedColor.
       
  5082                 ].
       
  5083             ].    
  5076             ^ self
  5084             ^ self
  5077         ].
  5085         ].
  5078         ^ self
  5086         ^ self
  5079     ].
  5087     ].
  5080 
  5088 
  5133         ^ self.
  5141         ^ self.
  5134     ].
  5142     ].
  5135 
  5143 
  5136     super update:something with:aParameter from:changedObject
  5144     super update:something with:aParameter from:changedObject
  5137 
  5145 
  5138     "Modified (comment): / 17-02-2017 / 14:28:01 / cg"
  5146     "Modified: / 20-03-2017 / 16:05:55 / cg"
  5139 !
  5147 !
  5140 
  5148 
  5141 updateAfterImageChange
  5149 updateAfterImageChange
  5142     |img|
  5150     |img|
  5143 
  5151