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
Hide 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
Please add newer entries at the top, list the date and your name with
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>
================================================================================
+pcbnew:
...
...
eeschema/class_text-label.cpp
View file @
f1c3b0c8
...
...
@@ -22,8 +22,8 @@
/**************************************************************************/
DrawTextStruct
::
DrawTextStruct
(
const
wxPoint
&
pos
,
const
wxString
&
text
,
KICAD_T
aType
)
:
EDA_BaseStruct
(
aType
)
,
EDA_TextStruct
(
text
)
EDA_BaseStruct
(
aType
)
,
EDA_TextStruct
(
text
)
/**************************************************************************/
{
m_Layer
=
LAYER_NOTES
;
...
...
@@ -38,16 +38,18 @@ DrawTextStruct* DrawTextStruct::GenCopy()
/*********************************************/
{
DrawTextStruct
*
newitem
;
switch
(
Type
()
)
{
default
:
case
DRAW_TEXT_STRUCT_TYPE
:
case
DRAW_TEXT_STRUCT_TYPE
:
newitem
=
new
DrawTextStruct
(
m_Pos
,
m_Text
);
break
;
case
DRAW_GLOBAL_LABEL_STRUCT_TYPE
:
newitem
=
new
DrawGlobalLabelStruct
(
m_Pos
,
m_Text
);
break
;
case
DRAW_LABEL_STRUCT_TYPE
:
newitem
=
new
DrawLabelStruct
(
m_Pos
,
m_Text
);
break
;
...
...
@@ -93,13 +95,13 @@ void DrawTextStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC )
{
/* restore old values and save new ones */
SwapData
(
(
DrawTextStruct
*
)
g_ItemToUndoCopy
);
/* save in undo list */
(
(
WinEDA_SchematicFrame
*
)
frame
)
->
SaveCopyInUndoList
(
this
,
IS_CHANGED
);
/* restore new values */
SwapData
(
(
DrawTextStruct
*
)
g_ItemToUndoCopy
);
delete
g_ItemToUndoCopy
;
g_ItemToUndoCopy
=
NULL
;
}
...
...
@@ -131,8 +133,9 @@ DrawGlobalLabelStruct::DrawGlobalLabelStruct( const wxPoint& pos, const wxString
/*******************************************************************************************/
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
*/
{
...
...
@@ -147,33 +150,39 @@ void DrawTextStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& off
switch
(
m_Orient
)
{
case
0
:
/* Orientation horiz normale
*/
case
0
:
/* Horiz Normal Orientation (left justified)
*/
DrawGraphicText
(
panel
,
DC
,
wxPoint
(
m_Pos
.
x
+
offset
.
x
,
m_Pos
.
y
-
TXTMARGE
+
offset
.
y
),
color
,
m_Text
,
m_Orient
*
900
,
m_Size
,
GR_TEXT_
HJUSTIFY_LEFT
,
GR_TEXT_
VJUSTIFY_BOTTOM
,
width
);
color
,
m_Text
,
TEXT_ORIENT_HORIZ
,
m_Size
,
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_BOTTOM
,
width
);
break
;
case
1
:
/* Orientation vert
UP */
case
1
:
/* Vert Orientation
UP */
DrawGraphicText
(
panel
,
DC
,
wxPoint
(
m_Pos
.
x
-
TXTMARGE
+
offset
.
x
,
m_Pos
.
y
+
offset
.
y
),
color
,
m_Text
,
m_Orient
*
900
,
m_Size
,
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_BOTTOM
,
width
);
wxPoint
(
m_Pos
.
x
-
TXTMARGE
+
offset
.
x
,
m_Pos
.
y
+
offset
.
y
),
color
,
m_Text
,
TEXT_ORIENT_VERT
,
m_Size
,
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_BOTTOM
,
width
);
break
;
case
2
:
/* Orientation horiz inverse
*/
case
2
:
/* Horiz Orientation - Right justified
*/
DrawGraphicText
(
panel
,
DC
,
wxPoint
(
m_Pos
.
x
+
offset
.
x
,
m_Pos
.
y
+
TXTMARGE
+
offset
.
y
),
color
,
m_Text
,
m_Orient
*
900
,
m_Size
,
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_TOP
,
width
);
wxPoint
(
m_Pos
.
x
+
offset
.
x
,
m_Pos
.
y
-
TXTMARGE
+
offset
.
y
),
color
,
m_Text
,
TEXT_ORIENT_HORIZ
,
m_Size
,
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_BOTTOM
,
width
);
break
;
case
3
:
/* Orientation vert
BOTTOM */
case
3
:
/* Vert Orientation
BOTTOM */
DrawGraphicText
(
panel
,
DC
,
wxPoint
(
m_Pos
.
x
+
TXTMARGE
+
offset
.
y
,
m_Pos
.
y
+
offset
.
y
),
color
,
m_Text
,
m_Orient
*
900
,
m_Size
,
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_TOP
,
width
);
wxPoint
(
m_Pos
.
x
-
TXTMARGE
+
offset
.
x
,
m_Pos
.
y
+
offset
.
y
),
color
,
m_Text
,
TEXT_ORIENT_VERT
,
m_Size
,
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_TOP
,
width
);
break
;
}
...
...
@@ -184,7 +193,7 @@ void DrawTextStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& off
/*********************************************************************************************/
void
DrawLabelStruct
::
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
const
wxPoint
&
offset
,
int
DrawMode
,
int
Color
)
int
DrawMode
,
int
Color
)
/*********************************************************************************************/
{
DrawTextStruct
::
Draw
(
panel
,
DC
,
offset
,
DrawMode
,
Color
);
...
...
@@ -193,7 +202,7 @@ void DrawLabelStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& of
/*******************************************************************************************/
void
DrawGlobalLabelStruct
::
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
const
wxPoint
&
offset
,
int
DrawMode
,
int
Color
)
int
DrawMode
,
int
Color
)
/******************************************************************************************/
/* Texts type Global Label have 4 directions, and the Text origin is the graphic icon
...
...
eeschema/plot.cpp
View file @
f1c3b0c8
...
...
@@ -530,7 +530,7 @@ int HalfSize;
pY
=
((
DrawTextStruct
*
)
Struct
)
->
m_Pos
.
y
;
offset
=
TXTMARGE
;
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
)
color
=
ReturnLayerColor
(((
DrawTextStruct
*
)
Struct
)
->
m_Layer
);
break
;
...
...
@@ -566,26 +566,26 @@ int HalfSize;
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_BOTTOM
);
break
;
case
2
:
/*
Orientation horiz inverse
*/
case
2
:
/*
Horiz Orientation - Right justified
*/
if
(
Struct
->
Type
()
==
DRAW_GLOBAL_LABEL_STRUCT_TYPE
)
PlotGraphicText
(
g_PlotFormat
,
wxPoint
(
pX
+
offset
,
pY
),
color
,
Text
,
TEXT_ORIENT_HORIZ
,
Size
,
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_CENTER
);
else
PlotGraphicText
(
g_PlotFormat
,
wxPoint
(
pX
,
pY
+
offset
),
color
,
Text
,
1800
,
Size
,
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_
TOP
);
color
,
Text
,
TEXT_ORIENT_HORIZ
,
Size
,
GR_TEXT_HJUSTIFY_RIGHT
,
GR_TEXT_VJUSTIFY_
BOTTOM
);
break
;
case
3
:
/* Orientation vert BOTTOM */
if
(
Struct
->
Type
()
==
DRAW_GLOBAL_LABEL_STRUCT_TYPE
)
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
);
else
PlotGraphicText
(
g_PlotFormat
,
wxPoint
(
pX
+
offset
,
pY
),
color
,
Text
,
2700
,
Size
,
GR_TEXT_HJUSTIFY_
LEF
T
,
GR_TEXT_VJUSTIFY_TOP
);
color
,
Text
,
TEXT_ORIENT_VERT
,
Size
,
GR_TEXT_HJUSTIFY_
RIGH
T
,
GR_TEXT_VJUSTIFY_TOP
);
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