| 198 | } |
| 199 | |
| 200 | void KicadLibParser::writePin(Pin *pin) |
| 201 | { |
| 202 | // http://en.wikibooks.org/wiki/Kicad/file_formats#X_record_.28Pin.29 |
| 203 | |
| 204 | // X PIN_NAME PAD_NAME X_POS Y_POS LINE_WIDTH DIRECTION NAME_TEXT_SIZE |
| 205 | // LABEL_TEXT_SIZE LAYER ?1? ELECTRICAL_TYPE |
| 206 | _stream << "X "; |
| 207 | if (pin->name().isEmpty()) |
| 208 | _stream << "~"; |
| 209 | else |
| 210 | _stream << pin->name(); |
| 211 | _stream << " " |
| 212 | << pin->padName() << " " // pad name |
| 213 | << pin->pos().x() << " " << -pin->pos().y() << " " // x y position |
| 214 | << pin->length() << " " // lenght |
| 215 | << pin->directionString() << " " // pin direction (up/down/left/right) |
| 216 | << "50" << " " // name text size |
| 217 | << "50" << " " // pad name text size |
| 218 | << pin->layer() << " " |
| 219 | << "1" << " " |
| 220 | << pin->electricalTypeString(); |
| 221 | if (pin->pinType() != Pin::Normal) |
| 222 | _stream << " " << pin->pinTypeString(); |
| 223 | } |
| 224 | |
| 225 | void KicadLibParser::writeDraw(Draw *draw) |
| 226 | { |
nothing calls this directly
no test coverage detected