1DSTYLE(5)                     File Formats Manual                    DSTYLE(5)
2
3
4

NAME

6       dstyle - format of .dstyle files (display styles)
7
8

DESCRIPTION

10       Display  styles  indicate  how to render information on a screen.  Each
11       style describes one way of rendering  information,  for  example  as  a
12       solid  area  in red or as a dotted outline in purple.  Different styles
13       correspond to mask layers, highlights, labels, menus,  window  borders,
14       and  so  on.  See ``Magic Maintainer's Manual #3: Display Styles, Color
15       Maps, and Glyphs'' for more information on how the styles are used.
16
17       Dstyle files usually have names of the form x.y.dstylen, where x  is  a
18       class  of  technologies,  y  is a class of displays, and n is a version
19       number (currently 5).  The version number may increase in the future if
20       the  format  of  dstyle  files changes.  For example, the display style
21       file mos.7bit.dstyle5 provides all the rendering  information  for  our
22       nMOS  and  CMOS technologies for color displays with at least 7 bits of
23       color.
24
25       Dstyle files are stored in ASCII as a series of lines.  Lines beginning
26       with  ``#'' are considered to be comments and are ignored.  The rest of
27       the lines of the file are divided up into  two  sections  separated  by
28       blank lines.  There should not be any blank lines within a section.
29

DISPLAY_STYLES SECTION

31       The first section begins with a line display_styles planes where planes
32       is the number of bits of color information  per  pixel  on  the  screen
33       (between  1  and  8).  Each line after that describes one display style
34       and contains eight fields separated by  white  space:  style  writeMask
35       color  outline  fill  stipple  shortName  longName  The meanings of the
36       fields are:
37
38       style  The number of this style, in decimal.  Styles 1 through  64  are
39              used  to  display  mask layers in the edit cell.  The style num‐
40              ber(s) to use for each mask layer  is  (are)  specified  in  the
41              technology  file.   Styles  65-128  are used for displaying mask
42              layers in non-edit cells.  If style x is used for a  mask  layer
43              in  the edit cell, style x+64 is used for the same mask layer in
44              non-edit cells.  Styles above 128 are used by the Magic code for
45              various things like menus and highlights.  See the file styles.h
46              in Magic for how styles above 128 are used.  When  redisplaying,
47              the  styles  are  drawn  in order starting at 1, so the order of
48              styles may affect what appears on the screen.
49
50       writeMask
51              This is an octal number specifying which bit-planes  are  to  be
52              modified when this style is rendered.  For example, 1 means only
53              information in bit-plane 0 will be affected, and 377  means  all
54              eight bit-planes are affected.
55
56       color  An octal number specifying the new values to be written into the
57              bit-planes that are modified.  This is used along with writeMask
58              to  determine the new value of each pixel that's being modified:
59              newPixel = (oldPixel & ∼writeMask) |  (color  &  writeMask)  The
60              red,  green,  and  blue intensities displayed for each pixel are
61              not deterimined directly by the value of the pixel;   they  come
62              from  a color map that maps the eight-bit pixel values into red,
63              green, and blue intensities.  Color maps are stored in  separate
64              files.
65
66       outline
67              If  this  field is zero, then no outline is drawn.  If the field
68              is non-zero, it specifies that outlines are to be  drawn  around
69              the  rectangular  areas  rendered  in  this style, and the octal
70              value gives an eight-bit pattern telling how to  draw  the  out‐
71              line.  For example, 377 means to draw a solid line, 252 means to
72              draw a dotted line, 360 specifies long dashes, etc.  This  field
73              only indicates which pixels will be modified:  the writeMask and
74              color fields indicate how the pixels are modified.
75
76       fill   This is a text string specifying how the  areas  drawn  in  this
77              style  should  be filled.  It must have one of the values solid,
78              stipple, cross, outline, grid.  Solid means that every pixel  in
79              the area is to modified according to writeMask and color.  Stip‐
80              ple means that the area should be stippled:  the stipple pattern
81              given  by  stipple is used to determine which pixels in the area
82              are to be modified.  Cross means that an X is drawn in  a  solid
83              line  between  the diagonally-opposite corners of the area being
84              rendered.  Outline means that the area should not be  filled  at
85              all;   only an outline is drawn (if specified by outline).  Grid
86              is a special style used to draw a grid in the line  style  given
87              by  outline.   The  styles cross and stipple may be supplemented
88              with an outline by giving a non-zero outline field.  The outline
89              and  grid  styles  don't  make  sense without an an outline, and
90              solid doesn't make sense with an outline (since all  the  pixels
91              are modified anyway).
92
93       stipple
94              Used  when  fill  is stipple to specify (in decimal) the stipple
95              number to use.
96
97       shortName
98              This is a one-character name for this style.   These  names  are
99              used  in the specification of glyphs and also in a few places in
100              the Magic source code.  Most styles have no short name;   use  a
101              ``-'' in this field for them.
102
103       longName
104              A  more human-readable name for the style.  It's not used at all
105              by Magic.
106

STIPPLES SECTION

108       The second section of a dstyle file is separated from the  first  by  a
109       blank  line.  The first line of the second section must be stipples and
110       each additional line specifies one stipple pattern with the syntax num‐
111       ber pattern name Number is a decimal number used to name the stipple in
112       the stipple fields of style lines.  Number must be no less than  1  and
113       must  be  no greater than a device-dependent upper limit.  Most devices
114       support at least 15 stipple patterns.  Pattern consists of eight  octal
115       numbers,  each  from  0-377  and separated by white space.  The numbers
116       form an 8-by-8 array of bits indicating which pixels are to be modified
117       when  the  stipple  is  used.   The name field is just a human-readable
118       description of the stipple;  it isn't used by Magic.
119
120

FILES

122       ∼cad/lib/magic/sys/mos.7bit.dstyle5
123
124

SEE ALSO

126       magic(1), cmap(5), glyphs(5)
127
128
129
1304th Berkeley Distribution                                            DSTYLE(5)
Impressum