File size: 15,360 Bytes
703f5e6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Meta -->
<meta name="Description" content="KLayout layout viewer and editor project page" />
<meta name="Keywords" content="KLayout OASIS GDS2 viewer editor layout semiconductor mask chip design" />
<meta name="abstract" content="KLayout is a free layout viewer and editor for several formats commonly used in the semiconductor industry to transfer layout data" />
<meta name="URL" content="https://www.klayout.de/" />
<meta name="Author" content="Matthias Koefferlein" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>KLayout Layout Viewer And Editor</title>
<!-- General -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.klayout.de/news.xml"/>
<link rel="stylesheet" type="text/css" href="https://www.klayout.de/format.css?v2.0"/>
<link rel="shortcut icon" href="https://www.klayout.de/favicon.ico"/>
<!-- Fonts -->
<link rel="stylesheet" type="text/css" href="https://www.klayout.de/fonts.css"/>
<!-- jQuery -->
<script src="https://www.klayout.de/jquery-3.4.1.min.js"></script>
<!-- bootstrap -->
<link href="https://www.klayout.de/bootstrap-4.3.1-dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://www.klayout.de/bootstrap-4.3.1-dist/js/bootstrap.min.js"></script>
</head>
<body>
<div class="klayout-header">
<div class="container mb-5">
<nav class="navbar navbar-dark navbar-expand-lg">
<a class="navbar-brand" href="https://www.klayout.de"><img src="https://www.klayout.de/klayout.png" srcset="https://www.klayout.de/klayout-x2.png 2x" alt="KLayout"></a>
<div class="collapse navbar-collapse" id="navbarToggleExternalContent">
<ul class="navbar-nav ml-auto mr-auto">
<li class="nav-item dropdown active mr-4">
<a class="nav-link dropdown-toggle klayout-menu" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
About
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="https://www.klayout.de/intro.html">KLayout Project</a>
<a class="dropdown-item" href="https://www.klayout.de/doc.html">Documentation</a>
<a class="dropdown-item" href="https://www.klayout.de/galleries.html">Galleries</a>
<a class="dropdown-item" href="https://www.klayout.de/credits.html">Credits</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="https://www.klayout.de/contact.html">Contact</a>
<a class="dropdown-item" href="https://www.klayout.de/impressum.html">Impressum / Imprint</a>
<a class="dropdown-item" href="https://www.klayout.de/privacy_policy.html">Datenschutz / Privacy Policy</a>
</div>
</li>
<li class="nav-item active mr-4">
<a class="nav-link klayout-menu" href="https://www.klayout.de/build.html">Get KLayout</a>
</li>
<li class="nav-item active mr-4">
<a class="nav-link klayout-menu" href="https://sami.klayout.org">Package Index</a>
</li>
<li class="nav-item active mr-5">
<a class="nav-link klayout-menu" href="https://www.klayout.de/forum">Forum</a>
</li>
<li class="nav-item active">
<span class="nav-link klayout-menu">
<a href="https://f-si.org"><img src="https://www.klayout.de/f-si_logo_32h_w.png" border="0" title="Free Silicon Foundation" alt="F-Si"/></a>
<a class="ml-4" href="https://github.com/KLayout"><img src="https://www.klayout.de/GitHub-Mark-32px-white.png" border="0" title="KLayout on GitHub" alt="GitHub"/></a>
</span>
</li>
</ul>
</div>
<!-- collapse button -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggleExternalContent" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</nav>
</div>
</div>
<div class="container">
<h1>Layer Properties (.lyp) File Format</h1>
<p>
This is a brief description of the layer properties file format (.lyp).
The file is basically an XML file with a certain structure. It is not just a plain layer list but also includes
custom stipple pattern, multiple tabs and a hierarchy a layer groups.
</p>
<p>
There are basically two versions: multi-tab files and single-tab files.
The multi-tab structure is used when a .lyp file contains multiple properties lists shown
as tabs in the layer list.
</p>
<h2>Single-Tab Files</h2>
<p>
The simple form of a layer properties file is a simple list of property definitions. Each property definition
corresponds to one entry in the layer list:
</p>
<pre>
<layer-properties>
<properties>
(property definitions)
</properties>
<properties>
(property definitions)
</properties>
...
</layer-properties>
</pre>
<p>
Each entry may contain child entries forming a hierarchy of layer properties nodes
(the "groups" in the layer list) by adding <group-member> elements. Groups can be
nested by including more <group-member> elements inside such a declaration:
</p>
<pre>
<layer-properties>
...
<properties>
(property definitions)
<group-members>
(property definitions)
<group-members>
...
</group-members>
</group-members>
</properties>
...
</layer-properties>
</pre>
<p>
A layer properties list can hold custom fill pattern which are referred to by the
"dither-pattern" element of the property definitions using "Cx" values:
</p>
<pre>
<layer-properties>
...
<custom-dither-pattern>
<pattern>
(pattern lines)
</pattern>
<order>(order index)</order>
<name>(name)</name>
</custom-dither-pattern>
</layer-properties>
</pre>
<p>
The order index is a number specifying the order which the pattern are presented in
the pattern list. Independently of that, the first pattern is referred to as "C0", the
second as "C1" and so on.
"name" gives the name under which the pattern appears in the list.
</p>
<p>
The pattern lines are given a strings in "line" elements where a "." is for a non-set pixel while
a "*" is for a set one. The number of lines is arbitrary but the number of pixels per line currently
is confined to 8, 16 or 32 pixels. Here is an example:
</p>
<pre>
<custom-dither-pattern>
<pattern>
<line>.......................*........</line>
<line>...**..................*........</line>
<line>.......................**.......</line>
<line>..*.....................*******.</line>
<line>...............*..............*.</line>
<line>*..........*****..............*.</line>
<line>*........*.....*..............*.</line>
<line>*.....*.......*...............*.</line>
<line>*****.........*...............*.</line>
<line>..............................*.</line>
<line>............*.....*****.......**</line>
<line>...........*.....**...*.........</line>
<line>..........*.....**....*.........</line>
<line>.........*...........*..........</line>
<line>.......*......*......*..........</line>
<line>......*.....**..................</line>
<line>.......*..*........*............</line>
<line>*......****........*....*.......</line>
<line>*......**........*.....**.......</line>
<line>**.....................**.......</line>
<line>.****..........*......***.......</line>
<line>......***....**.....*...*.......</line>
<line>.......**....*......*...*.......</line>
<line>.......*.....*....*.....*.......</line>
<line>.......*.....****......*........</line>
<line>......*.......**................</line>
<line>.....*................*.........</line>
<line>.....*................*..**.....</line>
<line>....*.................*****.....</line>
<line>....**....................*.....</line>
<line>.....******...............*.....</line>
<line>..........**....................</line>
</pattern>
<order>1</order>
<name>Irregular</name>
</custom-dither-pattern>
</pre>
<p>
A layer properties list can also hold custom line style pattern which are referred to by the
"line-style" element of the property definitions using "Cx" values:
</p>
<pre>
<layer-properties>
...
<custom-line-style>
<pattern>(pattern line)</pattern>
<order>(order index)</order>
<name>(name)</name>
</custom-line-style>
</layer-properties>
</pre>
<p>
The order index is a number specifying the order which the styles are presented in
the styles list. Independently of that, the first pattern is referred to as "C0", the
second as "C1" and so on.
"name" gives the name under which the style appears in the list.
</p>
<p>
The line pattern is given as a string where a "." is for a non-set pixel while
a "*" is for a set one. The number of pixels currently is confined to 32 max.
</p>
<pre>
<custom-line-style>
<pattern>*.*.*.***.***.***.*.*.*..</pattern>
<order>1</order>
<name>SOS</name>
</custom-line-style>
</pre>
<h2>Multi-Tab Layer Files</h2>
<p>
Multi-Tab files simply embed multiple "layer-properties" elements in another root
element called "layer-properties-tabs". In that case, each "layer-properties" element
specifies a name which is used as the tab's display text. The name can be empty in
which case the tabs are simply numbered:
</p>
<pre>
<layer-properties-tabs>
<layer-properties>
...
<name>Tab 1</name>
</layer-properties>
<layer-properties>
...
<name>Tab 2</name>
</layer-properties>
...
</layer-properties-tabs>
</pre>
<p>
Please note that if you use custom fill pattern, each set must be specified
individually per tab.
</p>
<h2>Property Definition Blocks</h2>
<p>
An example for a property definition block is:
</p>
<pre>
<expanded>true</expanded>
<frame-color>#ff80a8</frame-color>
<fill-color>#ff80a8</fill-color>
<frame-brightness>0</frame-brightness>
<fill-brightness>0</fill-brightness>
<dither-pattern>I9</dither-pattern>
<line-style>I4</line-style>
<valid>true</valid>
<visible>true</visible>
<transparent>false</transparent>
<width>1</width>
<marked>false</marked>
<xfill>false</xfill>
<animation>0</animation>
<name>Display name</name>
<source>1/0@1</source>
</pre>
<p>
The definition of these properties is the following:
</p>
<table>
<tr>
<th>Element</th>
<th>Value</th>
</tr>
<tr>
<td><b>expanded</b></td>
<td>Applies to group nodes. If 'true', the group node is expanded (shows the child elements). If 'false', the node is collapsed.</td>
</tr>
<tr>
<td><b>frame-color</b></td>
<td>The color of the frames (the pen in which is outer edges of the shapes are drawn) in HTML notation (#rrggbb)</td>
</tr>
<tr>
<td><b>fill-color</b></td>
<td>The color of the fill pattern inside the shapes in HTML notation (#rrggbb)</td>
</tr>
<tr>
<td><b>frame-brightness</b></td>
<td>This value modifies the brightness of the frame color. 0 is unmodified, -100 roughly adds 50% black to the color which +100 roughly adds 50% white.</td>
</tr>
<tr>
<td><b>fill-brightness</b></td>
<td>This value modifies the brightness of the fill color. See "frame-brightness".</td>
</tr>
<tr>
<td><b>dither-pattern</b></td>
<td>This is the number of the dither pattern used to fill the shapes. The values are "Ix" for one of the
built-in pattern where "I0" is "solid" and "I1" is "clear". "Cx" is one of the custom pattern if
these are defined (see above).</td>
</tr>
<tr>
<td><b>line-style</b></td>
<td>This is the number of the line style used to draw the shape boundaries. An empty string is "solid line".
The values are "Ix" for one of the
built-in styles where "I0" is "solid", "I1" is "dotted" etc. "Cx" is one of the custom styles if
these are defined (see above).</td>
</tr>
<tr>
<td><b>valid</b></td>
<td>This is a boolean value ("true" or "false") indicating whether the entry is valid or not.
Invalid layers are drawn but shapes on those layers can't be selected.
</td>
</tr>
<tr>
<td><b>visible</b></td>
<td>This is a boolean value ("true" or "false") indicating whether the entry is visible or not.</td>
</tr>
<tr>
<td><b>transparent</b></td>
<td>This is a boolean value ("true" or "false") indicating whether the entry is transparent or not.
Transparency is implemented in terms of bitwise-OR of the colors with dark background and
bitwise-AND of the colors with white background, so the effect is dependent on the bit
pattern of the RGB color triplets involved.
</td>
</tr>
<tr>
<td><b>width</b></td>
<td>This is the line width of the frame in pixels (or empty for the default which is 1).</td>
</tr>
<tr>
<td><b>marked</b></td>
<td>This is a boolean value ("true" or "false") indicating whether the entry is marked (drawn with small crosses) or not.</td>
</tr>
<tr>
<td><b>xfill</b></td>
<td>This is a boolean value ("true" or "false") indicating whether boxes are drawn with a diagonal cross.</td>
</tr>
<tr>
<td><b>animation</b></td>
<td>This is a value indicating the animation mode. 0 is "none", 1 is "scrolling", 2 is "blinking" and 3 is "inverse blinking".</td>
</tr>
<tr>
<td><b>name</b></td>
<td>This is the display name. The display name is the text which is shown for this entry. If no text
is given, a text will be generated from the layer, datatype and layer name.</td>
</tr>
<tr>
<td><b>source</b></td>
<td>This is the source where the shapes are taken from. That is a string describing the layout, layer, datatype and
selectors or transformations (see <a href="doc/about/layer_sources.html">here</a> for a detailed description of that
string). A source can partial, in which case it will provide defaults for child entries of an entry.</td>
</tr>
</table>
</div>
</body>
</html>
|