~ubuntu-branches/ubuntu/precise/fritzing/precise

« back to all changes in this revision

Viewing changes to src/items/dip.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Georges Khaznadar
  • Date: 2011-08-26 10:11:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110826101105-w5hmn7zcf93ig5v6
Tags: 0.6.3b-1
* upgrapded to the newer upstream version
* parameters of the function GraphicsUtils::distanceFromLine in 
  src/svg/groundplanegenerator.cpp:767 are now declared as doubles,
  which Closes: #636441
* the new version fixes src/utils/folderutils.cpp, which
  Closes: #636061

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
********************************************************************
20
20
 
21
 
$Revision: 5162 $:
 
21
$Revision: 5343 $:
22
22
$Author: cohen@irascible.com $:
23
 
$Date: 2011-07-02 22:39:11 +0200 (Sat, 02 Jul 2011) $
 
23
$Date: 2011-08-04 00:11:24 +0200 (Thu, 04 Aug 2011) $
24
24
 
25
25
********************************************************************/
26
26
 
146
146
                                        "<g id='copper1'><g id='copper0'>\n"
147
147
                                        "<rect fill='none' height='55' stroke='rgb(255, 191, 0)' stroke-width='20' width='55' x='32.5' y='32.5'/>\n");
148
148
 
149
 
        qreal outerBorder = 10;
150
 
        qreal silkSplitTop = 100;
151
 
        qreal offsetX = 60;
152
 
        qreal offsetY = 60;
153
 
        qreal spacing = TextUtils::convertToInches(spacingString) * 1000; 
154
 
        qreal totalWidth = 120 + spacing;
155
 
        qreal totalHeight = (100 * pins / 2) + (outerBorder * 2);
156
 
        qreal center = totalWidth / 2;
 
149
        double outerBorder = 10;
 
150
        double silkSplitTop = 100;
 
151
        double offsetX = 60;
 
152
        double offsetY = 60;
 
153
        double spacing = TextUtils::convertToInches(spacingString) * 1000; 
 
154
        double totalWidth = 120 + spacing;
 
155
        double totalHeight = (100 * pins / 2) + (outerBorder * 2);
 
156
        double center = totalWidth / 2;
157
157
 
158
158
        QString svg = header.arg(totalWidth / 1000).arg(totalHeight / 1000).arg(totalWidth).arg(totalHeight)
159
159
                                                        .arg(totalHeight - outerBorder).arg(totalWidth - outerBorder)
182
182
 
183
183
        int pins = pieces.at(3).toInt();
184
184
        int increment = 300;
185
 
        qreal totalHeight = (pins * increment / 2) + 330;
 
185
        double totalHeight = (pins * increment / 2) + 330;
186
186
        int border = 30;
187
187
 
188
188
        QString header("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
232
232
 
233
233
        int pins = pieces.at(2).toInt();
234
234
        int increment = 10;
235
 
        qreal totalWidth = (pins * increment);
 
235
        double totalWidth = (pins * increment);
236
236
 
237
237
        QString svg = TextUtils::incrementTemplate(":/resources/templates/generic_sip_bread_template.txt", 1, increment * (pins - 2), TextUtils::incMultiplyPinFunction, TextUtils::noCopyPinFunction);
238
238
 
256
256
 
257
257
        int pins = pieces.at(3).toInt();
258
258
        int increment = 10;
259
 
        qreal spacing = TextUtils::convertToInches(pieces.at(4)) * 100;
 
259
        double spacing = TextUtils::convertToInches(pieces.at(4)) * 100;
260
260
 
261
261
        QString repeatB("<rect id='connector%1pin' x='{13.5}' y='[28.66]' fill='#8C8C8C' width='3' height='4.34'/>\n"
262
262
                                        "<rect id='connector%1terminal' x='{13.5}' y='[30.0]' fill='#8C8C8C' width='3' height='3'/>\n"