Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
02b670d8
Commit
02b670d8
authored
Jan 01, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor change in eeschema.
parent
f7d1c72a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
class_libentry.cpp
eeschema/class_libentry.cpp
+4
-4
class_libentry_fields.cpp
eeschema/class_libentry_fields.cpp
+7
-3
No files found.
eeschema/class_libentry.cpp
View file @
02b670d8
...
@@ -148,7 +148,7 @@ EDA_Rect EDA_LibComponentStruct::GetBoundaryBox( int Unit, int Convert )
...
@@ -148,7 +148,7 @@ EDA_Rect EDA_LibComponentStruct::GetBoundaryBox( int Unit, int Convert )
case
COMPONENT_ARC_DRAW_TYPE
:
case
COMPONENT_ARC_DRAW_TYPE
:
{
{
// Arc is reduced to a line from m_Start to m_End.
// Arc is reduced to a line from m_Start to m_End.
// TO
DO better.
// TODO better.
LibDrawArc
*
Arc
=
(
LibDrawArc
*
)
DrawEntry
;
LibDrawArc
*
Arc
=
(
LibDrawArc
*
)
DrawEntry
;
x1
=
Arc
->
m_ArcStart
.
x
;
x1
=
Arc
->
m_ArcStart
.
x
;
y1
=
Arc
->
m_ArcStart
.
y
;
y1
=
Arc
->
m_ArcStart
.
y
;
...
@@ -202,7 +202,7 @@ EDA_Rect EDA_LibComponentStruct::GetBoundaryBox( int Unit, int Convert )
...
@@ -202,7 +202,7 @@ EDA_Rect EDA_LibComponentStruct::GetBoundaryBox( int Unit, int Convert )
xmax
=
MAX
(
xmax
,
x1
);
xmax
=
MAX
(
xmax
,
x1
);
ymin
=
MIN
(
ymin
,
y1
);
ymin
=
MIN
(
ymin
,
y1
);
ymax
=
MAX
(
ymax
,
y1
);
ymax
=
MAX
(
ymax
,
y1
);
#if 0
\
#if 0
// 0 pour englober le point origine de la pin, 1 pour englober toute la pin
// 0 pour englober le point origine de la pin, 1 pour englober toute la pin
switch( Pin->Orient )
switch( Pin->Orient )
{
{
...
@@ -255,8 +255,8 @@ EDA_Rect EDA_LibComponentStruct::GetBoundaryBox( int Unit, int Convert )
...
@@ -255,8 +255,8 @@ EDA_Rect EDA_LibComponentStruct::GetBoundaryBox( int Unit, int Convert )
}
}
}
}
// Update the BoundaryBox. Reme
n
ber the fact the screen Y axis is the reverse */
// Update the BoundaryBox. Reme
m
ber the fact the screen Y axis is the reverse */
ymax
=
-
ymax
;
ymin
=
-
ymin
;
// Y is
is screen axis sense
NEGATE
(
ymax
);
NEGATE
(
ymin
);
// Y is not
is screen axis sense
// Ensure w and H > 0 (wxRect assume it)
// Ensure w and H > 0 (wxRect assume it)
if
(
xmax
<
xmin
)
if
(
xmax
<
xmin
)
EXCHG
(
xmax
,
xmin
);
EXCHG
(
xmax
,
xmin
);
...
...
eeschema/class_libentry_fields.cpp
View file @
02b670d8
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#include "libcmp.h"
#include "libcmp.h"
#include "general.h"
#include "general.h"
#include "protos.h"
/***************************/
/***************************/
/* class LibraryFieldEntry */
/* class LibraryFieldEntry */
...
@@ -17,7 +18,7 @@
...
@@ -17,7 +18,7 @@
/* a Field is a string linked to a component.
/* a Field is a string linked to a component.
* Unlike a pure graphic text, fields can be used in netlist generation
* Unlike a pure graphic text, fields can be used in netlist generation
* and other t
hings
.
* and other t
old (BOM)
.
*
*
* 4 fields have a special meaning:
* 4 fields have a special meaning:
* REFERENCE
* REFERENCE
...
@@ -101,8 +102,11 @@ bool LibDrawField::Save( FILE* ExportFile ) const
...
@@ -101,8 +102,11 @@ bool LibDrawField::Save( FILE* ExportFile ) const
m_Italic
?
'I'
:
'N'
,
m_Italic
?
'I'
:
'N'
,
m_Width
>
1
?
'B'
:
'N'
);
m_Width
>
1
?
'B'
:
'N'
);
// Save field name, if necessary
/* Save field name, if necessary
if
(
m_FieldId
>=
FIELD1
&&
!
m_Name
.
IsEmpty
()
)
* Field name is saved only if it is not the default name.
* Just because default name depends on the language and can change from a country to an other
*/
if
(
m_FieldId
>=
FIELD1
&&
!
m_Name
.
IsEmpty
()
&&
m_Name
!=
ReturnDefaultFieldName
(
m_FieldId
))
fprintf
(
ExportFile
,
"
\"
%s
\"
"
,
CONV_TO_UTF8
(
m_Name
)
);
fprintf
(
ExportFile
,
"
\"
%s
\"
"
,
CONV_TO_UTF8
(
m_Name
)
);
fprintf
(
ExportFile
,
"
\n
"
);
fprintf
(
ExportFile
,
"
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment