XPMReader.st
changeset 3886 48e95f2d273d
parent 3688 10011de73077
child 3894 6eef17e67485
equal deleted inserted replaced
3885:e639779ef87b 3886:48e95f2d273d
   340 ! !
   340 ! !
   341 
   341 
   342 !XPMReader methodsFor:'private-writing'!
   342 !XPMReader methodsFor:'private-writing'!
   343 
   343 
   344 colorNameOf:aColor
   344 colorNameOf:aColor
   345     "generate a name for a color. If its a standard color,
   345     "generate a name for a color. If it's a standard color,
   346      return its name; otherwise return the hex representation."
   346      return its name; otherwise return the hex representation."
   347 
   347 
   348     #(white black red green blue
   348     #(white black red green blue
   349       yellow magenta cyan orange) do:[:aStandardColorName |
   349       yellow magenta cyan orange) do:[:aStandardColorName |
   350         aColor = (Color name:aStandardColorName) ifTrue:[
   350         aColor = (Color name:aStandardColorName) ifTrue:[
   354     ^ '#' 
   354     ^ '#' 
   355      , (aColor redByte hexPrintString:2)
   355      , (aColor redByte hexPrintString:2)
   356      , (aColor greenByte hexPrintString:2)
   356      , (aColor greenByte hexPrintString:2)
   357      , (aColor blueByte hexPrintString:2)
   357      , (aColor blueByte hexPrintString:2)
   358 
   358 
   359     "Created: / 27.2.1997 / 11:48:40 / cg"
   359     "Created: / 27-02-1997 / 11:48:40 / cg"
   360     "Modified: / 6.6.1998 / 20:58:49 / cg"
   360     "Modified: / 06-06-1998 / 20:58:49 / cg"
       
   361     "Modified (comment): / 13-02-2017 / 20:35:30 / cg"
   361 ! !
   362 ! !
   362 
   363 
   363 !XPMReader methodsFor:'reading'!
   364 !XPMReader methodsFor:'reading'!
   364 
   365 
   365 readImage
   366 readImage