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
4d12bd3e
Commit
4d12bd3e
authored
Dec 20, 2008
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Solved problems with mirrored texts. cleaning obsolete files
parent
af048ff2
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
41 additions
and
664 deletions
+41
-664
makefile.g95
bitmaps/makefile.g95
+1
-1
base_struct.cpp
common/base_struct.cpp
+5
-2
drawtxt.cpp
common/drawtxt.cpp
+4
-1
class_sch_cmp_field.cpp
eeschema/class_sch_cmp_field.cpp
+1
-1
CMakeLists.txt
gerbview/CMakeLists.txt
+0
-1
affiche.cpp
gerbview/affiche.cpp
+0
-60
makefile.include
gerbview/makefile.include
+0
-1
pcbtexte.cpp
gerbview/pcbtexte.cpp
+0
-427
process_config.cpp
gerbview/process_config.cpp
+0
-146
base_struct.h
include/base_struct.h
+1
-1
block.cpp
pcbnew/block.cpp
+1
-1
class_cotation.cpp
pcbnew/class_cotation.cpp
+4
-2
class_pcb_text.cpp
pcbnew/class_pcb_text.cpp
+10
-4
cotation.cpp
pcbnew/cotation.cpp
+2
-3
dialog_pcb_text_properties.cpp
pcbnew/dialog_pcb_text_properties.cpp
+2
-2
edit_pcb_text.cpp
pcbnew/edit_pcb_text.cpp
+2
-2
modules.cpp
pcbnew/modules.cpp
+6
-6
plot_rtn.cpp
pcbnew/plot_rtn.cpp
+2
-3
No files found.
bitmaps/makefile.g95
View file @
4d12bd3e
...
@@ -11,4 +11,4 @@ libbitmaps.a: $(OBJECTS)
...
@@ -11,4 +11,4 @@ libbitmaps.a: $(OBJECTS)
clean
:
clean
:
# rm -f *.o
# rm -f *.o
"
rm
-f
*.a
#
rm -f *.a
common/base_struct.cpp
View file @
4d12bd3e
...
@@ -166,7 +166,7 @@ EDA_TextStruct::EDA_TextStruct( const wxString& text )
...
@@ -166,7 +166,7 @@ EDA_TextStruct::EDA_TextStruct( const wxString& text )
m_Size
.
x
=
m_Size
.
y
=
DEFAULT_SIZE_TEXT
;
/* XY size of font */
m_Size
.
x
=
m_Size
.
y
=
DEFAULT_SIZE_TEXT
;
/* XY size of font */
m_Orient
=
0
;
/* Orient in 0.1 degrees */
m_Orient
=
0
;
/* Orient in 0.1 degrees */
m_Attributs
=
0
;
m_Attributs
=
0
;
m_Mir
oir
=
0
;
// display mirror if 1
m_Mir
ror
=
false
;
// display mirror if true
m_HJustify
=
GR_TEXT_HJUSTIFY_CENTER
;
m_HJustify
=
GR_TEXT_HJUSTIFY_CENTER
;
m_VJustify
=
GR_TEXT_VJUSTIFY_CENTER
;
/* Justifications Horiz et Vert du texte */
m_VJustify
=
GR_TEXT_VJUSTIFY_CENTER
;
/* Justifications Horiz et Vert du texte */
m_Width
=
0
;
/* thickness */
m_Width
=
0
;
/* thickness */
...
@@ -301,10 +301,13 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
...
@@ -301,10 +301,13 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
if
(
aDisplayMode
==
SKETCH
)
if
(
aDisplayMode
==
SKETCH
)
width
=
-
width
;
width
=
-
width
;
wxSize
size
=
m_Size
;
if
(
m_Mirror
)
size
.
x
=
-
size
.
x
;
DrawGraphicText
(
aPanel
,
aDC
,
DrawGraphicText
(
aPanel
,
aDC
,
aOffset
+
m_Pos
,
aColor
,
m_Text
,
aOffset
+
m_Pos
,
aColor
,
m_Text
,
m_Orient
,
m_S
ize
,
m_Orient
,
s
ize
,
m_HJustify
,
m_VJustify
,
width
,
m_Italic
);
m_HJustify
,
m_VJustify
,
width
,
m_Italic
);
}
}
...
...
common/drawtxt.cpp
View file @
4d12bd3e
...
@@ -61,6 +61,7 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel, wxDC* DC,
...
@@ -61,6 +61,7 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel, wxDC* DC,
int
ox
,
oy
;
// Draw coordinates for the current char
int
ox
,
oy
;
// Draw coordinates for the current char
int
coord
[
100
];
// Buffer coordinate used to draw polylines (char shapes)
int
coord
[
100
];
// Buffer coordinate used to draw polylines (char shapes)
bool
sketch_mode
=
false
;
bool
sketch_mode
=
false
;
bool
italic_reverse
=
false
;
// true for mirrored texts with m_Size.x < 0
if
(
aPanel
)
if
(
aPanel
)
zoom
=
aPanel
->
GetZoom
();
zoom
=
aPanel
->
GetZoom
();
...
@@ -76,6 +77,8 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel, wxDC* DC,
...
@@ -76,6 +77,8 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel, wxDC* DC,
sketch_mode
=
TRUE
;
sketch_mode
=
TRUE
;
}
}
int
thickness
=
aWidth
;
int
thickness
=
aWidth
;
if
(
aSize
.
x
<
0
)
// text is mirrored using size.x < 0 (mirror / Y axis)
italic_reverse
=
true
;
kk
=
0
;
kk
=
0
;
ptr
=
0
;
/* ptr = text index */
ptr
=
0
;
/* ptr = text index */
...
@@ -289,7 +292,7 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel, wxDC* DC,
...
@@ -289,7 +292,7 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel, wxDC* DC,
k2
=
(
k2
*
size_h
)
/
9
;
k2
=
(
k2
*
size_h
)
/
9
;
// To simulate an italic font, add a x offset depending on the y offset
// To simulate an italic font, add a x offset depending on the y offset
if
(
aItalic
)
if
(
aItalic
)
k2
-=
k1
/
8
;
k2
-=
italic_reverse
?
-
k1
/
8
:
k1
/
8
;
dx
=
k2
+
ox
;
dy
=
k1
+
oy
;
dx
=
k2
+
ox
;
dy
=
k1
+
oy
;
RotatePoint
(
&
dx
,
&
dy
,
cX
,
cY
,
aOrient
);
RotatePoint
(
&
dx
,
&
dy
,
cX
,
cY
,
aOrient
);
...
...
eeschema/class_sch_cmp_field.cpp
View file @
4d12bd3e
...
@@ -51,7 +51,7 @@ void SCH_CMP_FIELD::SwapData( SCH_CMP_FIELD* copyitem )
...
@@ -51,7 +51,7 @@ void SCH_CMP_FIELD::SwapData( SCH_CMP_FIELD* copyitem )
EXCHG
(
m_Size
,
copyitem
->
m_Size
);
EXCHG
(
m_Size
,
copyitem
->
m_Size
);
EXCHG
(
m_Width
,
copyitem
->
m_Width
);
EXCHG
(
m_Width
,
copyitem
->
m_Width
);
EXCHG
(
m_Orient
,
copyitem
->
m_Orient
);
EXCHG
(
m_Orient
,
copyitem
->
m_Orient
);
EXCHG
(
m_Mir
oir
,
copyitem
->
m_Miroi
r
);
EXCHG
(
m_Mir
ror
,
copyitem
->
m_Mirro
r
);
EXCHG
(
m_Attributs
,
copyitem
->
m_Attributs
);
EXCHG
(
m_Attributs
,
copyitem
->
m_Attributs
);
EXCHG
(
m_Italic
,
copyitem
->
m_Italic
);
EXCHG
(
m_Italic
,
copyitem
->
m_Italic
);
EXCHG
(
m_HJustify
,
copyitem
->
m_HJustify
);
EXCHG
(
m_HJustify
,
copyitem
->
m_HJustify
);
...
...
gerbview/CMakeLists.txt
View file @
4d12bd3e
...
@@ -8,7 +8,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
...
@@ -8,7 +8,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
../polygon
)
../polygon
)
set
(
GERBVIEW_SRCS
set
(
GERBVIEW_SRCS
affiche.cpp
block.cpp
block.cpp
controle.cpp
controle.cpp
dcode.cpp
dcode.cpp
...
...
gerbview/affiche.cpp
deleted
100644 → 0
View file @
af048ff2
/**********************************************************/
/* Routines d'affichage de parametres et caracteristiques */
/**********************************************************/
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "gerbview.h"
#include "pcbplot.h"
#include "protos.h"
/* Routines locales */
/****************************************************************************/
void
Affiche_Infos_PCB_Texte
(
WinEDA_BasePcbFrame
*
frame
,
TEXTE_PCB
*
pt_texte
)
/****************************************************************************/
/* Affiche en bas d'ecran les caract du texte sur PCB
* Entree :
* pointeur de la description du texte
*/
{
wxString
Line
;
frame
->
MsgPanel
->
EraseMsgBox
();
if
(
pt_texte
->
Type
()
==
TYPE_COTATION
)
Affiche_1_Parametre
(
frame
,
1
,
_
(
"COTATION"
),
pt_texte
->
m_Text
,
DARKGREEN
);
else
Affiche_1_Parametre
(
frame
,
1
,
_
(
"PCB Text"
),
pt_texte
->
m_Text
,
DARKGREEN
);
Line
=
_
(
"Layer "
);
Line
<<
pt_texte
->
GetLayer
()
+
1
;
Affiche_1_Parametre
(
frame
,
28
,
_
(
"Layer:"
),
Line
,
g_DesignSettings
.
m_LayerColor
[
pt_texte
->
GetLayer
()]
);
Affiche_1_Parametre
(
frame
,
36
,
_
(
"Mirror"
),
wxEmptyString
,
GREEN
);
if
(
(
pt_texte
->
m_Miroir
&
1
)
)
Affiche_1_Parametre
(
frame
,
-
1
,
wxEmptyString
,
_
(
"No"
),
DARKGREEN
);
else
Affiche_1_Parametre
(
frame
,
-
1
,
wxEmptyString
,
_
(
"Yes"
),
DARKGREEN
);
Line
.
Printf
(
wxT
(
"%.1f"
),
(
float
)
pt_texte
->
m_Orient
/
10
);
Affiche_1_Parametre
(
frame
,
43
,
_
(
"Orient"
),
Line
,
DARKGREEN
);
valeur_param
(
pt_texte
->
m_Width
,
Line
);
Affiche_1_Parametre
(
frame
,
50
,
_
(
"Width"
),
Line
,
MAGENTA
);
valeur_param
(
pt_texte
->
m_Size
.
x
,
Line
);
Affiche_1_Parametre
(
frame
,
60
,
_
(
"H Size"
),
Line
,
RED
);
valeur_param
(
pt_texte
->
m_Size
.
y
,
Line
);
Affiche_1_Parametre
(
frame
,
70
,
_
(
"V Size"
),
Line
,
RED
);
}
gerbview/makefile.include
View file @
4d12bd3e
...
@@ -30,7 +30,6 @@ OBJECTS= \
...
@@ -30,7 +30,6 @@ OBJECTS= \
set_color.o
\
set_color.o
\
gerbview_config.o
\
gerbview_config.o
\
class_marker.o
\
class_marker.o
\
affiche.o
\
tracepcb.o
\
tracepcb.o
\
class_pcb_text.o
\
class_pcb_text.o
\
trpiste.o
\
trpiste.o
\
...
...
gerbview/pcbtexte.cpp
deleted
100644 → 0
View file @
af048ff2
This diff is collapsed.
Click to expand it.
gerbview/process_config.cpp
deleted
100644 → 0
View file @
af048ff2
/******************************************/
/** cfg.cpp : configuration pour Gerbview */
/******************************************/
/* lit ou met a jour la configuration de PCBNEW */
#include "fctsys.h"
#include "common.h"
#include "gerbview.h"
#include "pcbplot.h"
#include "cfg.h"
#include "id.h"
#include "hotkeys_basic.h"
#include "hotkeys.h"
#include "protos.h"
/* Local functions */
static
bool
Read_Hotkey_Config
(
WinEDA_DrawFrame
*
frame
,
bool
verbose
);
/* Variables locales */
#define HOTKEY_FILENAME wxT("gerbview")
/*************************************************************/
void
WinEDA_GerberFrame
::
Process_Config
(
wxCommandEvent
&
event
)
/*************************************************************/
{
int
id
=
event
.
GetId
();
wxPoint
pos
;
wxString
FullFileName
;
pos
=
GetPosition
();
pos
.
x
+=
20
;
pos
.
y
+=
20
;
switch
(
id
)
{
case
ID_COLORS_SETUP
:
DisplayColorSetupFrame
(
this
,
pos
);
break
;
case
ID_CONFIG_REQ
:
// Creation de la fenetre de configuration
{
InstallConfigFrame
(
pos
);
break
;
}
case
ID_PCB_TRACK_SIZE_SETUP
:
case
ID_PCB_LOOK_SETUP
:
case
ID_OPTIONS_SETUP
:
InstallPcbOptionsFrame
(
pos
,
id
);
break
;
case
ID_CONFIG_SAVE
:
Update_config
();
break
;
case
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
:
FullFileName
=
DEFAULT_HOTKEY_FILENAME_PATH
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
WriteHotkeyConfigFile
(
FullFileName
,
s_Gerbview_Hokeys_Descr
,
true
);
break
;
case
ID_PREFERENCES_READ_CONFIG_HOTKEYS
:
Read_Hotkey_Config
(
this
,
true
);
break
;
default
:
DisplayError
(
this
,
wxT
(
"WinEDA_GerberFrame::Process_Config internal error"
));
}
}
/*****************************************************/
bool
Read_Config
()
/*****************************************************/
/* lit la configuration, si elle n'a pas deja etee lue
1 - lit gerbview.cnf
2 - si non trouve lit <chemin de gerbview.exe>/gerbview.cnf
3 - si non trouve: init des variables aux valeurs par defaut
Retourne un pointeur su le message d'erreur a afficher
*/
{
g_Prj_Config_Filename_ext
=
wxT
(
".cnf"
);
EDA_Appl
->
ReadProjectConfig
(
wxT
(
"gerbview"
),
GROUP
,
ParamCfgList
,
FALSE
);
/* Inits autres variables */
if
(
ScreenPcb
)
ScreenPcb
->
SetGrid
(
TmpGrid
);
if
(
g_PhotoFilenameExt
.
IsEmpty
()
)
g_PhotoFilenameExt
=
wxT
(
".pho"
);
if
(
g_DrillFilenameExt
.
IsEmpty
()
)
g_DrillFilenameExt
=
wxT
(
".drl"
);
if
(
g_PenFilenameExt
.
IsEmpty
()
)
g_PenFilenameExt
=
wxT
(
".pen"
);
return
TRUE
;
}
/******************************************/
void
WinEDA_GerberFrame
::
Update_config
()
/******************************************/
/*
creation du fichier de config
*/
{
wxString
FullFileName
;
wxString
mask
(
wxT
(
"*"
)
),
g_Prj_Config_Filename_ext
=
wxT
(
".cnf"
;)
mask
+=
g_Prj_Config_Filename_ext
;
FullFileName
=
wxT
(
"gerbview"
);
ChangeFileNameExt
(
FullFileName
,
g_Prj_Config_Filename_ext
);
FullFileName
=
EDA_FileSelector
(
_
(
"Save config file"
),
wxEmptyString
,
/* Chemin par defaut */
FullFileName
,
/* nom fichier par defaut */
g_Prj_Config_Filename_ext
,
/* extension par defaut */
mask
,
/* Masque d'affichage */
this
,
wxFD_SAVE
,
TRUE
);
if
(
FullFileName
.
IsEmpty
()
)
return
;
/* ecriture de la configuration */
EDA_Appl
->
WriteProjectConfig
(
FullFileName
,
GROUP
,
ParamCfgList
);
}
/***************************************************************/
bool
Read_Hotkey_Config
(
WinEDA_DrawFrame
*
frame
,
bool
verbose
)
/***************************************************************/
/*
* Read the hotkey files config for pcbnew and module_edit
*/
{
wxString
FullFileName
=
DEFAULT_HOTKEY_FILENAME_PATH
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
return
frame
->
ReadHotkeyConfigFile
(
FullFileName
,
s_Gerbview_Hokeys_Descr
,
verbose
);
}
include/base_struct.h
View file @
4d12bd3e
...
@@ -494,7 +494,7 @@ public:
...
@@ -494,7 +494,7 @@ public:
wxSize
m_Size
;
/* XY size of text */
wxSize
m_Size
;
/* XY size of text */
int
m_Width
;
/* text width */
int
m_Width
;
/* text width */
int
m_Orient
;
/* Orient in 0.1 degrees */
int
m_Orient
;
/* Orient in 0.1 degrees */
int
m_Miroir
;
// Display Normal / mirror
bool
m_Mirror
;
// Display Normal / mirror
int
m_Attributs
;
/* flags (visible...) */
int
m_Attributs
;
/* flags (visible...) */
bool
m_Italic
;
/* true to simulate an italic font... */
bool
m_Italic
;
/* true to simulate an italic font... */
GRTextHorizJustifyType
m_HJustify
;
/* Horiz Justify */
GRTextHorizJustifyType
m_HJustify
;
/* Horiz Justify */
...
...
pcbnew/block.cpp
View file @
4d12bd3e
...
@@ -891,7 +891,7 @@ void WinEDA_BasePcbFrame::Block_Invert( wxDC* DC )
...
@@ -891,7 +891,7 @@ void WinEDA_BasePcbFrame::Block_Invert( wxDC* DC )
INVERT_ANGLE
(
STRUCT
->
m_Orient
);
INVERT_ANGLE
(
STRUCT
->
m_Orient
);
if
(
(
STRUCT
->
GetLayer
()
==
COPPER_LAYER_N
)
||
(
STRUCT
->
GetLayer
()
==
CMP_N
)
)
if
(
(
STRUCT
->
GetLayer
()
==
COPPER_LAYER_N
)
||
(
STRUCT
->
GetLayer
()
==
CMP_N
)
)
{
{
STRUCT
->
m_Mir
oir
^=
1
;
/* inverse miroir */
STRUCT
->
m_Mir
ror
=
not
STRUCT
->
m_Mirror
;
/* inverse miroir */
}
}
STRUCT
->
SetLayer
(
ChangeSideNumLayer
(
STRUCT
->
GetLayer
()
)
);
STRUCT
->
SetLayer
(
ChangeSideNumLayer
(
STRUCT
->
GetLayer
()
)
);
break
;
break
;
...
...
pcbnew/class_cotation.cpp
View file @
4d12bd3e
...
@@ -120,12 +120,14 @@ bool COTATION::ReadCotationDescr( FILE* File, int* LineNum )
...
@@ -120,12 +120,14 @@ bool COTATION::ReadCotationDescr( FILE* File, int* LineNum )
if
(
Line
[
0
]
==
'P'
)
if
(
Line
[
0
]
==
'P'
)
{
{
int
normal_display
=
1
;
sscanf
(
Line
+
2
,
" %d %d %d %d %d %d %d"
,
sscanf
(
Line
+
2
,
" %d %d %d %d %d %d %d"
,
&
m_Text
->
m_Pos
.
x
,
&
m_Text
->
m_Pos
.
y
,
&
m_Text
->
m_Pos
.
x
,
&
m_Text
->
m_Pos
.
y
,
&
m_Text
->
m_Size
.
x
,
&
m_Text
->
m_Size
.
y
,
&
m_Text
->
m_Size
.
x
,
&
m_Text
->
m_Size
.
y
,
&
m_Text
->
m_Width
,
&
m_Text
->
m_Orient
,
&
m_Text
->
m_Width
,
&
m_Text
->
m_Orient
,
&
m_Text
->
m_Miroir
);
&
normal_display
);
m_Text
->
m_Mirror
=
normal_display
?
false
:
true
;
m_Pos
=
m_Text
->
m_Pos
;
m_Pos
=
m_Text
->
m_Pos
;
continue
;
continue
;
}
}
...
@@ -325,7 +327,7 @@ bool COTATION::Save( FILE* aFile ) const
...
@@ -325,7 +327,7 @@ bool COTATION::Save( FILE* aFile ) const
m_Text
->
m_Pos
.
x
,
m_Text
->
m_Pos
.
y
,
m_Text
->
m_Pos
.
x
,
m_Text
->
m_Pos
.
y
,
m_Text
->
m_Size
.
x
,
m_Text
->
m_Size
.
y
,
m_Text
->
m_Size
.
x
,
m_Text
->
m_Size
.
y
,
m_Text
->
m_Width
,
m_Text
->
m_Orient
,
m_Text
->
m_Width
,
m_Text
->
m_Orient
,
m_Text
->
m_Mir
oir
);
m_Text
->
m_Mir
ror
?
0
:
1
);
fprintf
(
aFile
,
"Sb %d %d %d %d %d %d
\n
"
,
S_SEGMENT
,
fprintf
(
aFile
,
"Sb %d %d %d %d %d %d
\n
"
,
S_SEGMENT
,
Barre_ox
,
Barre_oy
,
Barre_ox
,
Barre_oy
,
...
...
pcbnew/class_pcb_text.cpp
View file @
4d12bd3e
...
@@ -33,7 +33,7 @@ void TEXTE_PCB::Copy( TEXTE_PCB* source )
...
@@ -33,7 +33,7 @@ void TEXTE_PCB::Copy( TEXTE_PCB* source )
{
{
m_Parent
=
source
->
m_Parent
;
m_Parent
=
source
->
m_Parent
;
Pback
=
Pnext
=
NULL
;
Pback
=
Pnext
=
NULL
;
m_Mir
oir
=
source
->
m_Miroi
r
;
m_Mir
ror
=
source
->
m_Mirro
r
;
m_Size
=
source
->
m_Size
;
m_Size
=
source
->
m_Size
;
m_Orient
=
source
->
m_Orient
;
m_Orient
=
source
->
m_Orient
;
m_Pos
=
source
->
m_Pos
;
m_Pos
=
source
->
m_Pos
;
...
@@ -78,8 +78,12 @@ int TEXTE_PCB::ReadTextePcbDescr( FILE* File, int* LineNum )
...
@@ -78,8 +78,12 @@ int TEXTE_PCB::ReadTextePcbDescr( FILE* File, int* LineNum )
if
(
strncmp
(
Line
,
"De"
,
2
)
==
0
)
if
(
strncmp
(
Line
,
"De"
,
2
)
==
0
)
{
{
style
[
0
]
=
0
;
style
[
0
]
=
0
;
sscanf
(
Line
+
2
,
" %d %d %lX %s
\n
"
,
&
m_Layer
,
&
m_Miroir
,
int
normal_display
=
1
;
sscanf
(
Line
+
2
,
" %d %d %lX %s
\n
"
,
&
m_Layer
,
&
normal_display
,
&
m_TimeStamp
,
style
);
&
m_TimeStamp
,
style
);
m_Mirror
=
normal_display
?
false
:
true
;
if
(
m_Layer
<
FIRST_COPPER_LAYER
)
if
(
m_Layer
<
FIRST_COPPER_LAYER
)
m_Layer
=
FIRST_COPPER_LAYER
;
m_Layer
=
FIRST_COPPER_LAYER
;
if
(
m_Layer
>
LAST_NO_COPPER_LAYER
)
if
(
m_Layer
>
LAST_NO_COPPER_LAYER
)
...
@@ -116,7 +120,9 @@ bool TEXTE_PCB::Save( FILE* aFile ) const
...
@@ -116,7 +120,9 @@ bool TEXTE_PCB::Save( FILE* aFile ) const
fprintf
(
aFile
,
"Te
\"
%s
\"\n
"
,
CONV_TO_UTF8
(
m_Text
)
);
fprintf
(
aFile
,
"Te
\"
%s
\"\n
"
,
CONV_TO_UTF8
(
m_Text
)
);
fprintf
(
aFile
,
"Po %d %d %d %d %d %d
\n
"
,
fprintf
(
aFile
,
"Po %d %d %d %d %d %d
\n
"
,
m_Pos
.
x
,
m_Pos
.
y
,
m_Size
.
x
,
m_Size
.
y
,
m_Width
,
m_Orient
);
m_Pos
.
x
,
m_Pos
.
y
,
m_Size
.
x
,
m_Size
.
y
,
m_Width
,
m_Orient
);
fprintf
(
aFile
,
"De %d %d %lX %s
\n
"
,
m_Layer
,
m_Miroir
,
m_TimeStamp
,
style
);
fprintf
(
aFile
,
"De %d %d %lX %s
\n
"
,
m_Layer
,
m_Mirror
?
0
:
1
,
m_TimeStamp
,
style
);
if
(
fprintf
(
aFile
,
"$EndTEXTPCB
\n
"
)
!=
sizeof
(
"$EndTEXTPCB
\n
"
)
-
1
)
if
(
fprintf
(
aFile
,
"$EndTEXTPCB
\n
"
)
!=
sizeof
(
"$EndTEXTPCB
\n
"
)
-
1
)
goto
out
;
goto
out
;
...
@@ -177,7 +183,7 @@ void TEXTE_PCB::Display_Infos( WinEDA_DrawFrame* frame )
...
@@ -177,7 +183,7 @@ void TEXTE_PCB::Display_Infos( WinEDA_DrawFrame* frame )
g_DesignSettings
.
m_LayerColor
[
m_Layer
]
&
MASKCOLOR
);
g_DesignSettings
.
m_LayerColor
[
m_Layer
]
&
MASKCOLOR
);
Affiche_1_Parametre
(
frame
,
36
,
_
(
"Mirror"
),
wxEmptyString
,
GREEN
);
Affiche_1_Parametre
(
frame
,
36
,
_
(
"Mirror"
),
wxEmptyString
,
GREEN
);
if
(
m_Miroir
&
1
)
if
(
!
m_Mirror
)
Affiche_1_Parametre
(
frame
,
-
1
,
wxEmptyString
,
_
(
"No"
),
DARKGREEN
);
Affiche_1_Parametre
(
frame
,
-
1
,
wxEmptyString
,
_
(
"No"
),
DARKGREEN
);
else
else
Affiche_1_Parametre
(
frame
,
-
1
,
wxEmptyString
,
_
(
"Yes"
),
DARKGREEN
);
Affiche_1_Parametre
(
frame
,
-
1
,
wxEmptyString
,
_
(
"Yes"
),
DARKGREEN
);
...
...
pcbnew/cotation.cpp
View file @
4d12bd3e
...
@@ -114,7 +114,7 @@ WinEDA_CotationPropertiesFrame::WinEDA_CotationPropertiesFrame( WinEDA_PcbFrame*
...
@@ -114,7 +114,7 @@ WinEDA_CotationPropertiesFrame::WinEDA_CotationPropertiesFrame( WinEDA_PcbFrame*
m_Mirror
=
new
wxRadioBox
(
this
,
-
1
,
_
(
"Display"
),
m_Mirror
=
new
wxRadioBox
(
this
,
-
1
,
_
(
"Display"
),
wxDefaultPosition
,
wxSize
(
-
1
,
-
1
),
2
,
display_msg
,
wxDefaultPosition
,
wxSize
(
-
1
,
-
1
),
2
,
display_msg
,
1
,
wxRA_SPECIFY_COLS
);
1
,
wxRA_SPECIFY_COLS
);
if
(
!
Cotation
->
m_Text
->
m_Miroi
r
)
if
(
Cotation
->
m_Text
->
m_Mirro
r
)
m_Mirror
->
SetSelection
(
1
);;
m_Mirror
->
SetSelection
(
1
);;
RightBoxSizer
->
Add
(
m_Mirror
,
0
,
wxGROW
|
wxALL
,
5
);
RightBoxSizer
->
Add
(
m_Mirror
,
0
,
wxGROW
|
wxALL
,
5
);
...
@@ -173,7 +173,7 @@ void WinEDA_CotationPropertiesFrame::OnOkClick( wxCommandEvent& event )
...
@@ -173,7 +173,7 @@ void WinEDA_CotationPropertiesFrame::OnOkClick( wxCommandEvent& event )
CurrentCotation
->
m_Text
->
m_Size
=
m_TxtSizeCtrl
->
GetValue
();
CurrentCotation
->
m_Text
->
m_Size
=
m_TxtSizeCtrl
->
GetValue
();
CurrentCotation
->
m_Text
->
m_Width
=
CurrentCotation
->
m_Width
=
CurrentCotation
->
m_Text
->
m_Width
=
CurrentCotation
->
m_Width
=
m_TxtWidthCtrl
->
GetValue
();
m_TxtWidthCtrl
->
GetValue
();
CurrentCotation
->
m_Text
->
m_Mir
oir
=
(
m_Mirror
->
GetSelection
()
==
0
)
?
1
:
0
;
CurrentCotation
->
m_Text
->
m_Mir
ror
=
(
m_Mirror
->
GetSelection
()
==
1
)
?
true
:
false
;
CurrentCotation
->
SetLayer
(
m_SelLayerBox
->
GetChoice
()
+
FIRST_NO_COPPER_LAYER
);
CurrentCotation
->
SetLayer
(
m_SelLayerBox
->
GetChoice
()
+
FIRST_NO_COPPER_LAYER
);
CurrentCotation
->
m_Text
->
SetLayer
(
m_SelLayerBox
->
GetChoice
()
+
FIRST_NO_COPPER_LAYER
);
CurrentCotation
->
m_Text
->
SetLayer
(
m_SelLayerBox
->
GetChoice
()
+
FIRST_NO_COPPER_LAYER
);
...
@@ -254,7 +254,6 @@ COTATION* WinEDA_PcbFrame::Begin_Cotation( COTATION* Cotation, wxDC* DC )
...
@@ -254,7 +254,6 @@ COTATION* WinEDA_PcbFrame::Begin_Cotation( COTATION* Cotation, wxDC* DC )
Cotation
->
FlecheD2_ox
=
Cotation
->
FlecheD2_fx
=
pos
.
x
;
Cotation
->
FlecheD2_ox
=
Cotation
->
FlecheD2_fx
=
pos
.
x
;
Cotation
->
FlecheD2_oy
=
Cotation
->
FlecheD2_fy
=
pos
.
y
;
Cotation
->
FlecheD2_oy
=
Cotation
->
FlecheD2_fy
=
pos
.
y
;
Cotation
->
m_Text
->
m_Miroir
=
1
;
Cotation
->
m_Text
->
m_Size
=
g_DesignSettings
.
m_PcbTextSize
;
Cotation
->
m_Text
->
m_Size
=
g_DesignSettings
.
m_PcbTextSize
;
Cotation
->
m_Text
->
m_Width
=
g_DesignSettings
.
m_PcbTextWidth
;
Cotation
->
m_Text
->
m_Width
=
g_DesignSettings
.
m_PcbTextWidth
;
...
...
pcbnew/dialog_pcb_text_properties.cpp
View file @
4d12bd3e
...
@@ -166,7 +166,7 @@ WinEDA_TextPCBPropertiesFrame::WinEDA_TextPCBPropertiesFrame( WinEDA_PcbFrame* p
...
@@ -166,7 +166,7 @@ WinEDA_TextPCBPropertiesFrame::WinEDA_TextPCBPropertiesFrame( WinEDA_PcbFrame* p
m_Mirror
=
new
wxRadioBox
(
this
,
-
1
,
_
(
"Display"
),
m_Mirror
=
new
wxRadioBox
(
this
,
-
1
,
_
(
"Display"
),
wxDefaultPosition
,
wxSize
(
-
1
,
-
1
),
2
,
display_msg
,
wxDefaultPosition
,
wxSize
(
-
1
,
-
1
),
2
,
display_msg
,
1
,
wxRA_SPECIFY_COLS
);
1
,
wxRA_SPECIFY_COLS
);
if
(
!
TextPCB
->
m_Miroi
r
)
if
(
TextPCB
->
m_Mirro
r
)
m_Mirror
->
SetSelection
(
1
);
m_Mirror
->
SetSelection
(
1
);
MiddleBoxSizer
->
Add
(
m_Mirror
,
0
,
wxGROW
|
wxALL
,
5
);
MiddleBoxSizer
->
Add
(
m_Mirror
,
0
,
wxGROW
|
wxALL
,
5
);
...
@@ -227,7 +227,7 @@ void WinEDA_TextPCBPropertiesFrame::OnOkClick( wxCommandEvent& event )
...
@@ -227,7 +227,7 @@ void WinEDA_TextPCBPropertiesFrame::OnOkClick( wxCommandEvent& event )
if
(
CurrentTextPCB
->
m_Width
>
max_tickness
)
if
(
CurrentTextPCB
->
m_Width
>
max_tickness
)
CurrentTextPCB
->
m_Width
=
max_tickness
;
CurrentTextPCB
->
m_Width
=
max_tickness
;
CurrentTextPCB
->
m_Mir
oir
=
(
m_Mirror
->
GetSelection
()
==
0
)
?
1
:
0
;
CurrentTextPCB
->
m_Mir
ror
=
(
m_Mirror
->
GetSelection
()
==
1
)
?
true
:
false
;
CurrentTextPCB
->
m_Orient
=
m_Orient
->
GetSelection
()
*
900
;
CurrentTextPCB
->
m_Orient
=
m_Orient
->
GetSelection
()
*
900
;
CurrentTextPCB
->
SetLayer
(
m_SelLayerBox
->
GetChoice
()
);
CurrentTextPCB
->
SetLayer
(
m_SelLayerBox
->
GetChoice
()
);
CurrentTextPCB
->
m_Italic
=
m_Style
->
GetSelection
()
?
1
:
0
;
CurrentTextPCB
->
m_Italic
=
m_Style
->
GetSelection
()
?
1
:
0
;
...
...
pcbnew/edit_pcb_text.cpp
View file @
4d12bd3e
...
@@ -138,9 +138,9 @@ TEXTE_PCB* WinEDA_PcbFrame::Create_Texte_Pcb( wxDC* DC )
...
@@ -138,9 +138,9 @@ TEXTE_PCB* WinEDA_PcbFrame::Create_Texte_Pcb( wxDC* DC )
/* Mise a jour des caracteristiques */
/* Mise a jour des caracteristiques */
TextePcb
->
m_Flags
=
IS_NEW
;
TextePcb
->
m_Flags
=
IS_NEW
;
TextePcb
->
SetLayer
(
((
PCB_SCREEN
*
)
GetScreen
())
->
m_Active_Layer
);
TextePcb
->
SetLayer
(
((
PCB_SCREEN
*
)
GetScreen
())
->
m_Active_Layer
);
TextePcb
->
m_Mir
oir
=
1
;
TextePcb
->
m_Mir
ror
=
false
;
if
(
TextePcb
->
GetLayer
()
==
COPPER_LAYER_N
)
if
(
TextePcb
->
GetLayer
()
==
COPPER_LAYER_N
)
TextePcb
->
m_Mir
oir
=
0
;
TextePcb
->
m_Mir
ror
=
true
;
TextePcb
->
m_Size
=
g_DesignSettings
.
m_PcbTextSize
;
TextePcb
->
m_Size
=
g_DesignSettings
.
m_PcbTextSize
;
TextePcb
->
m_Pos
=
GetScreen
()
->
m_Curseur
;
TextePcb
->
m_Pos
=
GetScreen
()
->
m_Curseur
;
...
...
pcbnew/modules.cpp
View file @
4d12bd3e
...
@@ -421,7 +421,7 @@ void BOARD::Change_Side_Module( MODULE* Module, wxDC* DC )
...
@@ -421,7 +421,7 @@ void BOARD::Change_Side_Module( MODULE* Module, wxDC* DC )
pt_texte
->
m_Pos
.
y
=
-
pt_texte
->
m_Pos
.
y
;
pt_texte
->
m_Pos
.
y
=
-
pt_texte
->
m_Pos
.
y
;
pt_texte
->
m_Pos
.
y
+=
Module
->
m_Pos
.
y
;
pt_texte
->
m_Pos
.
y
+=
Module
->
m_Pos
.
y
;
pt_texte
->
m_Pos0
.
y
=
pt_texte
->
m_Pos0
.
y
;
pt_texte
->
m_Pos0
.
y
=
pt_texte
->
m_Pos0
.
y
;
pt_texte
->
m_Miroir
=
1
;
pt_texte
->
m_Miroir
=
false
;
NEGATE_AND_NORMALIZE_ANGLE_POS
(
pt_texte
->
m_Orient
);
NEGATE_AND_NORMALIZE_ANGLE_POS
(
pt_texte
->
m_Orient
);
pt_texte
->
SetLayer
(
Module
->
GetLayer
()
);
pt_texte
->
SetLayer
(
Module
->
GetLayer
()
);
pt_texte
->
SetLayer
(
ChangeSideNumLayer
(
pt_texte
->
GetLayer
()
)
);
pt_texte
->
SetLayer
(
ChangeSideNumLayer
(
pt_texte
->
GetLayer
()
)
);
...
@@ -434,7 +434,7 @@ void BOARD::Change_Side_Module( MODULE* Module, wxDC* DC )
...
@@ -434,7 +434,7 @@ void BOARD::Change_Side_Module( MODULE* Module, wxDC* DC )
if
(
(
Module
->
GetLayer
()
==
SILKSCREEN_N_CU
)
if
(
(
Module
->
GetLayer
()
==
SILKSCREEN_N_CU
)
||
(
Module
->
GetLayer
()
==
ADHESIVE_N_CU
)
||
(
Module
->
GetLayer
()
==
COPPER_LAYER_N
)
)
||
(
Module
->
GetLayer
()
==
ADHESIVE_N_CU
)
||
(
Module
->
GetLayer
()
==
COPPER_LAYER_N
)
)
pt_texte
->
m_Miroir
=
0
;
pt_texte
->
m_Miroir
=
true
;
/* Inversion miroir de la Valeur et mise en miroir : */
/* Inversion miroir de la Valeur et mise en miroir : */
pt_texte
=
Module
->
m_Value
;
pt_texte
=
Module
->
m_Value
;
...
@@ -442,7 +442,7 @@ void BOARD::Change_Side_Module( MODULE* Module, wxDC* DC )
...
@@ -442,7 +442,7 @@ void BOARD::Change_Side_Module( MODULE* Module, wxDC* DC )
pt_texte
->
m_Pos
.
y
=
-
pt_texte
->
m_Pos
.
y
;
pt_texte
->
m_Pos
.
y
=
-
pt_texte
->
m_Pos
.
y
;
pt_texte
->
m_Pos
.
y
+=
Module
->
m_Pos
.
y
;
pt_texte
->
m_Pos
.
y
+=
Module
->
m_Pos
.
y
;
pt_texte
->
m_Pos0
.
y
=
pt_texte
->
m_Pos0
.
y
;
pt_texte
->
m_Pos0
.
y
=
pt_texte
->
m_Pos0
.
y
;
pt_texte
->
m_Miroir
=
1
;
pt_texte
->
m_Miroir
=
false
;
NEGATE_AND_NORMALIZE_ANGLE_POS
(
pt_texte
->
m_Orient
);
NEGATE_AND_NORMALIZE_ANGLE_POS
(
pt_texte
->
m_Orient
);
pt_texte
->
SetLayer
(
Module
->
GetLayer
()
);
pt_texte
->
SetLayer
(
Module
->
GetLayer
()
);
pt_texte
->
SetLayer
(
ChangeSideNumLayer
(
pt_texte
->
GetLayer
()
)
);
pt_texte
->
SetLayer
(
ChangeSideNumLayer
(
pt_texte
->
GetLayer
()
)
);
...
@@ -455,7 +455,7 @@ void BOARD::Change_Side_Module( MODULE* Module, wxDC* DC )
...
@@ -455,7 +455,7 @@ void BOARD::Change_Side_Module( MODULE* Module, wxDC* DC )
if
(
(
Module
->
GetLayer
()
==
SILKSCREEN_N_CU
)
if
(
(
Module
->
GetLayer
()
==
SILKSCREEN_N_CU
)
||
(
Module
->
GetLayer
()
==
ADHESIVE_N_CU
)
||
(
Module
->
GetLayer
()
==
COPPER_LAYER_N
)
)
||
(
Module
->
GetLayer
()
==
ADHESIVE_N_CU
)
||
(
Module
->
GetLayer
()
==
COPPER_LAYER_N
)
)
pt_texte
->
m_Miroir
=
0
;
pt_texte
->
m_Miroir
=
true
;
/* Inversion miroir des dessins de l'empreinte : */
/* Inversion miroir des dessins de l'empreinte : */
PtStruct
=
Module
->
m_Drawings
;
PtStruct
=
Module
->
m_Drawings
;
...
@@ -489,7 +489,7 @@ void BOARD::Change_Side_Module( MODULE* Module, wxDC* DC )
...
@@ -489,7 +489,7 @@ void BOARD::Change_Side_Module( MODULE* Module, wxDC* DC )
pt_texte
->
m_Pos
.
y
=
-
pt_texte
->
m_Pos
.
y
;
pt_texte
->
m_Pos
.
y
=
-
pt_texte
->
m_Pos
.
y
;
pt_texte
->
m_Pos
.
y
+=
Module
->
m_Pos
.
y
;
pt_texte
->
m_Pos
.
y
+=
Module
->
m_Pos
.
y
;
pt_texte
->
m_Pos0
.
y
=
pt_texte
->
m_Pos0
.
y
;
pt_texte
->
m_Pos0
.
y
=
pt_texte
->
m_Pos0
.
y
;
pt_texte
->
m_Miroir
=
1
;
pt_texte
->
m_Miroir
=
false
;
NEGATE_AND_NORMALIZE_ANGLE_POS
(
pt_texte
->
m_Orient
);
NEGATE_AND_NORMALIZE_ANGLE_POS
(
pt_texte
->
m_Orient
);
pt_texte
->
SetLayer
(
Module
->
GetLayer
()
);
pt_texte
->
SetLayer
(
Module
->
GetLayer
()
);
...
@@ -505,7 +505,7 @@ void BOARD::Change_Side_Module( MODULE* Module, wxDC* DC )
...
@@ -505,7 +505,7 @@ void BOARD::Change_Side_Module( MODULE* Module, wxDC* DC )
||
Module
->
GetLayer
()
==
ADHESIVE_N_CU
||
Module
->
GetLayer
()
==
ADHESIVE_N_CU
||
Module
->
GetLayer
()
==
COPPER_LAYER_N
)
||
Module
->
GetLayer
()
==
COPPER_LAYER_N
)
{
{
pt_texte
->
m_Miroir
=
0
;
pt_texte
->
m_Miroir
=
true
;
}
}
break
;
break
;
...
...
pcbnew/plot_rtn.cpp
View file @
4d12bd3e
...
@@ -563,7 +563,7 @@ void PlotTextePcb( TEXTE_PCB* pt_texte, int format_plot, int masque_layer )
...
@@ -563,7 +563,7 @@ void PlotTextePcb( TEXTE_PCB* pt_texte, int format_plot, int masque_layer )
/****************************************************************************/
/****************************************************************************/
/* Trace 1 Texte type PCB , c.a.d autre que les textes sur modules */
/* Trace 1 Texte type PCB , c.a.d autre que les textes sur modules */
{
{
int
no_miroir
,
orient
,
thickness
;
int
orient
,
thickness
;
wxPoint
pos
;
wxPoint
pos
;
wxSize
size
;
wxSize
size
;
...
@@ -576,10 +576,9 @@ void PlotTextePcb( TEXTE_PCB* pt_texte, int format_plot, int masque_layer )
...
@@ -576,10 +576,9 @@ void PlotTextePcb( TEXTE_PCB* pt_texte, int format_plot, int masque_layer )
size
=
pt_texte
->
m_Size
;
size
=
pt_texte
->
m_Size
;
pos
=
pt_texte
->
m_Pos
;
pos
=
pt_texte
->
m_Pos
;
orient
=
pt_texte
->
m_Orient
;
orient
=
pt_texte
->
m_Orient
;
no_miroir
=
pt_texte
->
m_Miroir
&
1
;
thickness
=
pt_texte
->
m_Width
;
thickness
=
pt_texte
->
m_Width
;
if
(
no_miroir
==
FALSE
)
if
(
pt_texte
->
m_Mirror
)
size
.
x
=
-
size
.
x
;
size
.
x
=
-
size
.
x
;
Plot_1_texte
(
format_plot
,
pt_texte
->
m_Text
,
orient
,
Plot_1_texte
(
format_plot
,
pt_texte
->
m_Text
,
orient
,
...
...
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