aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/nsimage.m3
-rw-r--r--src/nsterm.m10
3 files changed, 13 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c250ead9cc4..90e83f03667 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -18,9 +18,13 @@
18 (EmacsPrefsController-setPanelFromDefaultValues) New function. 18 (EmacsPrefsController-setPanelFromDefaultValues) New function.
19 (EmacsPrefsController-resetToDefaults:): Use it. (Bug#1801) 19 (EmacsPrefsController-resetToDefaults:): Use it. (Bug#1801)
20 (ns_font_to_xlfd, ns_fontname_to_xlfd): Remove, unused. 20 (ns_font_to_xlfd, ns_fontname_to_xlfd): Remove, unused.
21 (ns_defined_color): Fix settings of the XColor variable fields:
22 red,green,blue scale to 2-byte, pixel's parts to 1-byte. (Bug#1663)
21 23
22 * nsimage.m (EmacsImage+allocInitFromFile:): Set to ignore DPI. 24 * nsimage.m (EmacsImage+allocInitFromFile:): Set to ignore image
23 (Bug#1316) 25 DPI. (Bug#1316)
26 (EmacsImage-setPixelAtX:Y:toRed:green:blue:alpha:): Fix color
27 values in onTiger section.
24 28
252009-01-19 Chong Yidong <cyd@stupidchicken.com> 292009-01-19 Chong Yidong <cyd@stupidchicken.com>
26 30
diff --git a/src/nsimage.m b/src/nsimage.m
index f99a9d2a03e..b13c12903ad 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -453,7 +453,8 @@ static EmacsImage *ImageList = nil;
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}
diff --git a/src/nsterm.m b/src/nsterm.m
index fba0e726e47..826efc4a22a 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1610,14 +1610,14 @@ ns_defined_color (struct frame *f, char *name, XColor *color_def, int alloc,
1610 color_def->pixel = ns_index_color(temp, f); /* [temp retain]; */ 1610 color_def->pixel = ns_index_color(temp, f); /* [temp retain]; */
1611 1611
1612 [temp getRed: &r green: &g blue: &b alpha: &a]; 1612 [temp getRed: &r green: &g blue: &b alpha: &a];
1613 color_def->red = r * 256; 1613 color_def->red = r * 65535;
1614 color_def->green = g * 256; 1614 color_def->green = g * 65535;
1615 color_def->blue = b * 256; 1615 color_def->blue = b * 65535;
1616 1616
1617 if (!makeIndex) 1617 if (!makeIndex)
1618 color_def->pixel 1618 color_def->pixel
1619 = ARGB_TO_ULONG((int)(a*256), 1619 = ARGB_TO_ULONG((int)(a*255),
1620 color_def->red, color_def->green, color_def->blue); 1620 (int)(r*255), (int)(g*255), (int)(b*255));
1621 1621
1622 return 1; 1622 return 1;
1623} 1623}