Mercurial > emacs
comparison src/nsimage.m @ 101329:954e1944ccf2
* nsimage.m (EmacsImage-setPixelAtX:Y:toRed:green:blue:alpha:): Fix color values in onTiger section. * nsterm.m (ns_defined_color): Fix settings of the XColor variable fields: red,green,blue scale to 2-byte, pixel's components to 1-byte. (Bug#1663)
author | Adrian Robert <Adrian.B.Robert@gmail.com> |
---|---|
date | Wed, 21 Jan 2009 22:28:45 +0000 |
parents | 06994fb0863f |
children | 8bf66a156bc5 |
comparison
equal
deleted
inserted
replaced
101328:1fff4a4a0c27 | 101329:954e1944ccf2 |
---|---|
451 pixmapData[3][loc] = a; | 451 pixmapData[3][loc] = a; |
452 } | 452 } |
453 else if (onTiger) | 453 else if (onTiger) |
454 { | 454 { |
455 [bmRep setColor: | 455 [bmRep setColor: |
456 [NSColor colorWithCalibratedRed: r green: g blue: b alpha: a] | 456 [NSColor colorWithCalibratedRed: (r/255.0) green: (g/255.0) |
457 blue: (b/255.0) alpha: (a/255.0)] | |
457 atX: x y: y]; | 458 atX: x y: y]; |
458 } | 459 } |
459 } | 460 } |
460 | 461 |
461 - (void) setAlphaAtX: (int) x Y: (int) y to: (unsigned char) a | 462 - (void) setAlphaAtX: (int) x Y: (int) y to: (unsigned char) a |