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
f179183d
Commit
f179183d
authored
Sep 11, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed some dead code.
parent
90a3b97c
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
15 additions
and
26 deletions
+15
-26
view.cpp
common/view/view.cpp
+3
-3
view_group.cpp
common/view/view_group.cpp
+2
-2
view_item.cpp
common/view/view_item.cpp
+1
-6
worksheet_item.cpp
common/worksheet_item.cpp
+3
-3
view_group.h
include/view/view_group.h
+1
-2
view_item.h
include/view/view_item.h
+2
-7
worksheet_item.h
include/worksheet_item.h
+1
-1
selection_area.cpp
pcbnew/tools/selection_area.cpp
+1
-1
selection_area.h
pcbnew/tools/selection_area.h
+1
-1
No files found.
common/view/view.cpp
View file @
f179183d
...
...
@@ -586,7 +586,7 @@ void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const
group
=
m_gal
->
BeginGroup
();
aItem
->
setGroup
(
aLayer
,
group
);
if
(
!
m_painter
->
Draw
(
aItem
,
aLayer
)
)
aItem
->
ViewDraw
(
aLayer
,
m_gal
,
BOX2I
()
);
// Alternative drawing method
aItem
->
ViewDraw
(
aLayer
,
m_gal
);
// Alternative drawing method
m_gal
->
EndGroup
();
}
}
...
...
@@ -594,7 +594,7 @@ void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const
{
// Immediate mode
if
(
!
m_painter
->
Draw
(
aItem
,
aLayer
)
)
aItem
->
ViewDraw
(
aLayer
,
m_gal
,
BOX2I
()
);
// Alternative drawing method
aItem
->
ViewDraw
(
aLayer
,
m_gal
);
// Alternative drawing method
}
// Draws a bright contour around the item
...
...
@@ -673,7 +673,7 @@ struct VIEW::recacheLayer
int
group
=
gal
->
BeginGroup
();
aItem
->
setGroup
(
layer
,
group
);
if
(
!
view
->
m_painter
->
Draw
(
aItem
,
layer
)
)
aItem
->
ViewDraw
(
layer
,
gal
,
BOX2I
()
);
// Alternative drawing method
aItem
->
ViewDraw
(
layer
,
gal
);
// Alternative drawing method
gal
->
EndGroup
();
}
else
...
...
common/view/view_group.cpp
View file @
f179183d
...
...
@@ -85,7 +85,7 @@ const BOX2I VIEW_GROUP::ViewBBox() const
}
void
VIEW_GROUP
::
ViewDraw
(
int
aLayer
,
GAL
*
aGal
,
const
BOX2I
&
aVisibleArea
)
const
void
VIEW_GROUP
::
ViewDraw
(
int
aLayer
,
GAL
*
aGal
)
const
{
PAINTER
*
painter
=
m_view
->
GetPainter
();
...
...
@@ -103,7 +103,7 @@ void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) co
aGal
->
SetLayerDepth
(
m_view
->
GetLayerOrder
(
layers
[
i
]
)
);
if
(
!
painter
->
Draw
(
item
,
layers
[
i
]
)
)
item
->
ViewDraw
(
layers
[
i
],
aGal
,
aVisibleArea
);
// Alternative drawing method
item
->
ViewDraw
(
layers
[
i
],
aGal
);
// Alternative drawing method
}
}
}
...
...
common/view/view_item.cpp
View file @
f179183d
...
...
@@ -48,17 +48,12 @@ void VIEW_ITEM::ViewSetVisible( bool aIsVisible )
}
void
VIEW_ITEM
::
ViewUpdate
(
int
aUpdateFlags
,
bool
aForceImmediateRedraw
)
void
VIEW_ITEM
::
ViewUpdate
(
int
aUpdateFlags
)
{
if
(
!
m_view
)
return
;
m_view
->
invalidateItem
(
this
,
aUpdateFlags
);
if
(
aForceImmediateRedraw
)
{
m_view
->
Redraw
();
}
}
...
...
common/worksheet_item.cpp
View file @
f179183d
...
...
@@ -76,7 +76,7 @@ const BOX2I WORKSHEET_ITEM::ViewBBox() const
}
void
WORKSHEET_ITEM
::
ViewDraw
(
int
aLayer
,
GAL
*
aGal
,
const
BOX2I
&
aVisibleArea
)
const
void
WORKSHEET_ITEM
::
ViewDraw
(
int
aLayer
,
GAL
*
aGal
)
const
{
RENDER_SETTINGS
*
settings
=
m_view
->
GetPainter
()
->
GetSettings
();
wxString
fileName
(
m_fileName
);
...
...
@@ -84,8 +84,8 @@ void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea
WS_DRAW_ITEM_LIST
drawList
;
drawList
.
SetPenSize
(
settings
->
GetWorksheetLineWidth
()
);
// Sorry,but I don't get this multi #ifdef from include/convert_to_biu.h, so here goes a magic
// number. IU_PER_MILS should be 25400 (as in a different compiltion unit), but somehow
// Sorry,
but I don't get this multi #ifdef from include/convert_to_biu.h, so here goes a magic
// number. IU_PER_MILS should be 25400 (as in a different compil
a
tion unit), but somehow
// it equals 1 in this case..
drawList
.
SetMilsToIUfactor
(
25400
/* IU_PER_MILS */
);
drawList
.
SetSheetNumber
(
m_sheetNumber
);
...
...
include/view/view_group.h
View file @
f179183d
...
...
@@ -107,9 +107,8 @@ public:
*
* @param aLayer is the layer which should be drawn.
* @param aGal is the GAL that should be used for drawing.
* @param aVisibleArea is limiting the drawing area.
*/
virtual
void
ViewDraw
(
int
aLayer
,
GAL
*
aGal
,
const
BOX2I
&
aVisibleArea
)
const
;
virtual
void
ViewDraw
(
int
aLayer
,
GAL
*
aGal
)
const
;
/**
* Function ViewGetLayers()
...
...
include/view/view_item.h
View file @
f179183d
...
...
@@ -101,11 +101,8 @@ public:
*
* @param aLayer: current drawing layer
* @param aGal: pointer to the GAL device we are drawing on
* @param aVisibleArea: area (in world space coordinates) that is relevant for drawing. For
* example, when drawing a bitmap, one can clip the blitting area to aVisibleArea, reducing
* drawing time.
*/
virtual
void
ViewDraw
(
int
aLayer
,
GAL
*
aGal
,
const
BOX2I
&
aVisibleArea
)
const
{
};
virtual
void
ViewDraw
(
int
aLayer
,
GAL
*
aGal
)
const
{
};
/**
* Function ViewGetLayers()
...
...
@@ -155,10 +152,8 @@ public:
* this item has changed. For static views calling has no effect.
*
* @param aUpdateFlags: how much the object has changed
* @param aForceImmediateRedraw: when true, the VIEW is redrawn immediately,
* otherwise, it will be redrawn upon next call of VIEW::Update()
*/
virtual
void
ViewUpdate
(
int
aUpdateFlags
=
ALL
,
bool
aForceImmediateRedraw
=
false
);
virtual
void
ViewUpdate
(
int
aUpdateFlags
=
ALL
);
/**
* Function ViewRelease()
...
...
include/worksheet_item.h
View file @
f179183d
...
...
@@ -120,7 +120,7 @@ public:
const
BOX2I
ViewBBox
()
const
;
/// @copydoc VIEW_ITEM::ViewDraw()
void
ViewDraw
(
int
aLayer
,
GAL
*
aGal
,
const
BOX2I
&
aVisibleArea
)
const
;
void
ViewDraw
(
int
aLayer
,
GAL
*
aGal
)
const
;
/// @copydoc VIEW_ITEM::ViewGetLayers()
void
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
;
...
...
pcbnew/tools/selection_area.cpp
View file @
f179183d
...
...
@@ -47,7 +47,7 @@ void SELECTION_AREA::ViewGetLayers( int aLayers[], int& aCount ) const
}
void
SELECTION_AREA
::
ViewDraw
(
int
aLayer
,
GAL
*
aGal
,
const
BOX2I
&
aVisibleArea
)
const
void
SELECTION_AREA
::
ViewDraw
(
int
aLayer
,
GAL
*
aGal
)
const
{
aGal
->
SetLineWidth
(
1.0
);
aGal
->
SetStrokeColor
(
COLOR4D
(
1.0
,
1.0
,
0.4
,
1.0
)
);
...
...
pcbnew/tools/selection_area.h
View file @
f179183d
...
...
@@ -50,7 +50,7 @@ public:
virtual
const
BOX2I
ViewBBox
()
const
;
void
ViewDraw
(
int
aLayer
,
KiGfx
::
GAL
*
aGal
,
const
BOX2I
&
aVisibleArea
)
const
;
void
ViewDraw
(
int
aLayer
,
KiGfx
::
GAL
*
aGal
)
const
;
void
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
;
void
SetOrigin
(
VECTOR2I
aOrigin
)
...
...
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