Magic Mailing List |
|
From: R. Timothy Edwards (tim AT stravinsky DOT jhuapl.edu) Date: Mon Aug 19 2002 - 09:29:31 EDT
Dear Yonggang, While working on various "magic" issues over the weekend, I tracked down the cause of the "black box" edit box when magic is running in a 16-bit visual. The problem is in the magic library file $CAD_HOME/lib/magic/sys/mos.24bit.dstyle5. The box cursor entries are: # num mask color outline fill number name name # ----+------+--------+--------+------+-------+------+-------------- 160 100 100 000 solid 0 - solid_highlights 161 100 100 000 stipple 12 - medium_highlights 162 100 100 000 stipple 9 - pale_highlights 163 100 100 000 stipple 10 - horiz_highlights 164 100 100 000 stipple 11 - vert_highlights 165 100 100 377 outline 0 - outline_highlights 166 100 100 314 outline 0 - dotted_highlights However, color (octal) number 100 is decimal number 64, which has no entry in the colormap file. So it depends on how magic fills in the remaining entries in the colormap. I haven't checked why the colormap entry gets a different value in 16-bit mode than in 8- or 24-bit modes, but one way to get around the problem is to redefine those entries as: # num mask color outline fill number name name # ----+------+--------+--------+------+-------+------+-------------- 160 040 040 000 solid 0 - solid_highlights 161 040 040 000 stipple 12 - medium_highlights 162 040 040 000 stipple 9 - pale_highlights 163 040 040 000 stipple 10 - horiz_highlights 164 040 040 000 stipple 11 - vert_highlights 165 040 040 377 outline 0 - outline_highlights 166 040 040 314 outline 0 - dotted_highlights . . . which points to color 63, which is defined as white in the colormap file. The fact that the new color is not related to the "highlight" bit (see the comments at the top of the dstyle file) is irrelevant in TrueColor mode, so this solution works fine. Regards, Tim
|
|