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
cc103ad3
Commit
cc103ad3
authored
Mar 30, 2008
by
diemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added GetBoundingBox() for DrawSheetStruct. Minor beautification.
parent
6d5a764e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
class_drawsheet.cpp
eeschema/class_drawsheet.cpp
+14
-0
class_screen.h
eeschema/class_screen.h
+4
-3
No files found.
eeschema/class_drawsheet.cpp
View file @
cc103ad3
...
@@ -262,6 +262,20 @@ void DrawSheetStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& of
...
@@ -262,6 +262,20 @@ void DrawSheetStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& of
}
}
}
}
EDA_Rect
DrawSheetStruct
::
GetBoundingBox
(){
int
dx
,
dy
;
// Determine length of texts
wxString
Text1
=
wxT
(
"Sheet: "
)
+
m_SheetName
;
wxString
Text2
=
wxT
(
"File: "
)
+
m_FileName
;
int
textlen1
=
10
*
Text1
.
Len
()
*
m_SheetNameSize
/
9
;
int
textlen2
=
10
*
Text2
.
Len
()
*
m_FileNameSize
/
9
;
textlen1
=
MAX
(
textlen1
,
textlen2
);
dx
=
MAX
(
m_Size
.
x
,
textlen1
);
dy
=
m_Size
.
y
+
m_SheetNameSize
+
m_FileNameSize
+
16
;
EDA_Rect
box
(
wxPoint
(
m_Pos
.
x
,
m_Pos
.
y
-
m_SheetNameSize
-
8
),
wxSize
(
dx
,
dy
)
);
return
box
;
}
/**************************************************************************************/
/**************************************************************************************/
void
DrawSheetStruct
::
DeleteAnnotation
(
bool
recurse
)
void
DrawSheetStruct
::
DeleteAnnotation
(
bool
recurse
)
...
...
eeschema/class_screen.h
View file @
cc103ad3
...
@@ -130,6 +130,7 @@ public:
...
@@ -130,6 +130,7 @@ public:
void
CleanupSheet
(
WinEDA_SchematicFrame
*
frame
,
wxDC
*
DC
);
void
CleanupSheet
(
WinEDA_SchematicFrame
*
frame
,
wxDC
*
DC
);
virtual
void
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
const
wxPoint
&
offset
,
virtual
void
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
const
wxPoint
&
offset
,
int
draw_mode
,
int
Color
=
-
1
);
int
draw_mode
,
int
Color
=
-
1
);
EDA_Rect
GetBoundingBox
();
void
SwapData
(
DrawSheetStruct
*
copyitem
);
void
SwapData
(
DrawSheetStruct
*
copyitem
);
void
DeleteAnnotation
(
bool
recurse
);
void
DeleteAnnotation
(
bool
recurse
);
int
ComponentCount
();
int
ComponentCount
();
...
...
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