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
f1c3b0c8
Commit
f1c3b0c8
authored
Jan 21, 2008
by
CHARRAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
labels and texts display changed when rotated 180 degres
parent
e9b3322f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
33 deletions
+48
-33
change_log.txt
change_log.txt
+6
-0
class_text-label.cpp
eeschema/class_text-label.cpp
+35
-26
plot.cpp
eeschema/plot.cpp
+7
-7
No files found.
change_log.txt
View file @
f1c3b0c8
...
@@ -4,6 +4,12 @@ Started 2007-June-11
...
@@ -4,6 +4,12 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
Please add newer entries at the top, list the date and your name with
email address.
email address.
2008-Jan-20 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+eeschema:
labels and texts display changed when rotated 180 degres:
horizontal text are now right justified insteed of 180 degree rotated, and are readable.
2008-Jan-20 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
2008-Jan-20 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
================================================================================
+pcbnew:
+pcbnew:
...
...
eeschema/class_text-label.cpp
View file @
f1c3b0c8
...
@@ -22,8 +22,8 @@
...
@@ -22,8 +22,8 @@
/**************************************************************************/
/**************************************************************************/
DrawTextStruct
::
DrawTextStruct
(
const
wxPoint
&
pos
,
const
wxString
&
text
,
KICAD_T
aType
)
:
DrawTextStruct
::
DrawTextStruct
(
const
wxPoint
&
pos
,
const
wxString
&
text
,
KICAD_T
aType
)
:
EDA_BaseStruct
(
aType
)
,
EDA_BaseStruct
(
aType
)
EDA_TextStruct
(
text
)
,
EDA_TextStruct
(
text
)
/**************************************************************************/
/**************************************************************************/
{
{
m_Layer
=
LAYER_NOTES
;
m_Layer
=
LAYER_NOTES
;
...
@@ -45,9 +45,11 @@ DrawTextStruct* DrawTextStruct::GenCopy()
...
@@ -45,9 +45,11 @@ DrawTextStruct* DrawTextStruct::GenCopy()
case
DRAW_TEXT_STRUCT_TYPE
:
case
DRAW_TEXT_STRUCT_TYPE
:
newitem
=
new
DrawTextStruct
(
m_Pos
,
m_Text
);
newitem
=
new
DrawTextStruct
(
m_Pos
,
m_Text
);
break
;
break
;
case
DRAW_GLOBAL_LABEL_STRUCT_TYPE
:
case
DRAW_GLOBAL_LABEL_STRUCT_TYPE
:
newitem
=
new
DrawGlobalLabelStruct
(
m_Pos
,
m_Text
);
newitem
=
new
DrawGlobalLabelStruct
(
m_Pos
,
m_Text
);
break
;
break
;
case
DRAW_LABEL_STRUCT_TYPE
:
case
DRAW_LABEL_STRUCT_TYPE
:
newitem
=
new
DrawLabelStruct
(
m_Pos
,
m_Text
);
newitem
=
new
DrawLabelStruct
(
m_Pos
,
m_Text
);
break
;
break
;
...
@@ -133,6 +135,7 @@ DrawGlobalLabelStruct::DrawGlobalLabelStruct( const wxPoint& pos, const wxString
...
@@ -133,6 +135,7 @@ DrawGlobalLabelStruct::DrawGlobalLabelStruct( const wxPoint& pos, const wxString
void
DrawTextStruct
::
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
const
wxPoint
&
offset
,
void
DrawTextStruct
::
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
const
wxPoint
&
offset
,
int
DrawMode
,
int
Color
)
int
DrawMode
,
int
Color
)
/*******************************************************************************************/
/*******************************************************************************************/
/* Texts type Comment (text on layer "NOTE") have 4 directions, and the Text origin is the first letter
/* Texts type Comment (text on layer "NOTE") have 4 directions, and the Text origin is the first letter
*/
*/
{
{
...
@@ -147,33 +150,39 @@ void DrawTextStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& off
...
@@ -147,33 +150,39 @@ void DrawTextStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& off
switch
(
m_Orient
)
switch
(
m_Orient
)
{
{
case
0
:
/* Orientation horiz normale
*/
case
0
:
/* Horiz Normal Orientation (left justified)
*/
DrawGraphicText
(
panel
,
DC
,
DrawGraphicText
(
panel
,
DC
,
wxPoint
(
m_Pos
.
x
+
offset
.
x
,
m_Pos
.
y
-
TXTMARGE
+
offset
.
y
),
wxPoint
(
m_Pos
.
x
+
offset
.
x
,
m_Pos
.
y
-
TXTMARGE
+
offset
.
y
),
color
,
color
,
m_Text
,
TEXT_ORIENT_HORIZ
,
m_Size
,
m_Text
,
m_Orient
*
900
,
m_Size
,
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_
HJUSTIFY_LEFT
,
GR_TEXT_
VJUSTIFY_BOTTOM
,
width
);
GR_TEXT_VJUSTIFY_BOTTOM
,
width
);
break
;
break
;
case
1
:
/* Orientation vert
UP */
case
1
:
/* Vert Orientation
UP */
DrawGraphicText
(
panel
,
DC
,
DrawGraphicText
(
panel
,
DC
,
wxPoint
(
m_Pos
.
x
-
TXTMARGE
+
offset
.
x
,
m_Pos
.
y
+
offset
.
y
),
color
,
wxPoint
(
m_Pos
.
x
-
TXTMARGE
+
offset
.
x
,
m_Text
,
m_Orient
*
900
,
m_Size
,
m_Pos
.
y
+
offset
.
y
),
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_BOTTOM
,
width
);
color
,
m_Text
,
TEXT_ORIENT_VERT
,
m_Size
,
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_BOTTOM
,
width
);
break
;
break
;
case
2
:
/* Orientation horiz inverse
*/
case
2
:
/* Horiz Orientation - Right justified
*/
DrawGraphicText
(
panel
,
DC
,
DrawGraphicText
(
panel
,
DC
,
wxPoint
(
m_Pos
.
x
+
offset
.
x
,
m_Pos
.
y
+
TXTMARGE
+
offset
.
y
),
color
,
wxPoint
(
m_Pos
.
x
+
offset
.
x
,
m_Pos
.
y
-
m_Text
,
m_Orient
*
900
,
m_Size
,
TXTMARGE
+
offset
.
y
),
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_TOP
,
width
);
color
,
m_Text
,
TEXT_ORIENT_HORIZ
,
m_Size
,
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_BOTTOM
,
width
);
break
;
break
;
case
3
:
/* Orientation vert
BOTTOM */
case
3
:
/* Vert Orientation
BOTTOM */
DrawGraphicText
(
panel
,
DC
,
DrawGraphicText
(
panel
,
DC
,
wxPoint
(
m_Pos
.
x
+
TXTMARGE
+
offset
.
y
,
m_Pos
.
y
+
offset
.
y
),
color
,
wxPoint
(
m_Pos
.
x
-
TXTMARGE
+
offset
.
x
,
m_Text
,
m_Orient
*
900
,
m_Size
,
m_Pos
.
y
+
offset
.
y
),
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_TOP
,
width
);
color
,
m_Text
,
TEXT_ORIENT_VERT
,
m_Size
,
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_TOP
,
width
);
break
;
break
;
}
}
...
...
eeschema/plot.cpp
View file @
f1c3b0c8
...
@@ -530,7 +530,7 @@ int HalfSize;
...
@@ -530,7 +530,7 @@ int HalfSize;
pY
=
((
DrawTextStruct
*
)
Struct
)
->
m_Pos
.
y
;
pY
=
((
DrawTextStruct
*
)
Struct
)
->
m_Pos
.
y
;
offset
=
TXTMARGE
;
offset
=
TXTMARGE
;
if
(
Struct
->
Type
()
==
DRAW_GLOBAL_LABEL_STRUCT_TYPE
)
if
(
Struct
->
Type
()
==
DRAW_GLOBAL_LABEL_STRUCT_TYPE
)
offset
+=
Size
.
x
;
// We must
draw the Glabel grapho
c symbol
offset
+=
Size
.
x
;
// We must
also draw the Glabel graphi
c symbol
if
(
(
g_PlotFormat
==
PLOT_FORMAT_POST
)
&&
g_PlotPSColorOpt
)
if
(
(
g_PlotFormat
==
PLOT_FORMAT_POST
)
&&
g_PlotPSColorOpt
)
color
=
ReturnLayerColor
(((
DrawTextStruct
*
)
Struct
)
->
m_Layer
);
color
=
ReturnLayerColor
(((
DrawTextStruct
*
)
Struct
)
->
m_Layer
);
break
;
break
;
...
@@ -566,26 +566,26 @@ int HalfSize;
...
@@ -566,26 +566,26 @@ int HalfSize;
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_BOTTOM
);
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_BOTTOM
);
break
;
break
;
case
2
:
/*
Orientation horiz inverse
*/
case
2
:
/*
Horiz Orientation - Right justified
*/
if
(
Struct
->
Type
()
==
DRAW_GLOBAL_LABEL_STRUCT_TYPE
)
if
(
Struct
->
Type
()
==
DRAW_GLOBAL_LABEL_STRUCT_TYPE
)
PlotGraphicText
(
g_PlotFormat
,
wxPoint
(
pX
+
offset
,
pY
),
PlotGraphicText
(
g_PlotFormat
,
wxPoint
(
pX
+
offset
,
pY
),
color
,
Text
,
TEXT_ORIENT_HORIZ
,
Size
,
color
,
Text
,
TEXT_ORIENT_HORIZ
,
Size
,
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_CENTER
);
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_CENTER
);
else
else
PlotGraphicText
(
g_PlotFormat
,
wxPoint
(
pX
,
pY
+
offset
),
PlotGraphicText
(
g_PlotFormat
,
wxPoint
(
pX
,
pY
+
offset
),
color
,
Text
,
1800
,
Size
,
color
,
Text
,
TEXT_ORIENT_HORIZ
,
Size
,
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_
TOP
);
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_
BOTTOM
);
break
;
break
;
case
3
:
/* Orientation vert BOTTOM */
case
3
:
/* Orientation vert BOTTOM */
if
(
Struct
->
Type
()
==
DRAW_GLOBAL_LABEL_STRUCT_TYPE
)
if
(
Struct
->
Type
()
==
DRAW_GLOBAL_LABEL_STRUCT_TYPE
)
PlotGraphicText
(
g_PlotFormat
,
wxPoint
(
pX
,
pY
-
offset
),
PlotGraphicText
(
g_PlotFormat
,
wxPoint
(
pX
,
pY
-
offset
),
color
,
Text
,
2700
,
Size
,
color
,
Text
,
TEXT_ORIENT_VERT
,
Size
,
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_BOTTOM
);
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_BOTTOM
);
else
else
PlotGraphicText
(
g_PlotFormat
,
wxPoint
(
pX
+
offset
,
pY
),
PlotGraphicText
(
g_PlotFormat
,
wxPoint
(
pX
+
offset
,
pY
),
color
,
Text
,
2700
,
Size
,
color
,
Text
,
TEXT_ORIENT_VERT
,
Size
,
GR_TEXT_HJUSTIFY_
LEF
T
,
GR_TEXT_VJUSTIFY_TOP
);
GR_TEXT_HJUSTIFY_
RIGH
T
,
GR_TEXT_VJUSTIFY_TOP
);
break
;
break
;
}
}
...
...
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