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
9fe9fc7c
Commit
9fe9fc7c
authored
Oct 31, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix macro to inline conversion
parent
edc9268c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
gr_basic.cpp
common/gr_basic.cpp
+12
-4
No files found.
common/gr_basic.cpp
View file @
9fe9fc7c
...
@@ -98,11 +98,15 @@ int GRMapY( int y )
...
@@ -98,11 +98,15 @@ int GRMapY( int y )
}
}
#define WHEN_OUTSIDE return
#define WHEN_OUTSIDE return
true;
#define WHEN_INSIDE
#define WHEN_INSIDE
static
inline
void
clip_line
(
int
&
x1
,
int
&
y1
,
int
&
x2
,
int
&
y2
)
/**
* Function clip_line
* @return bool - true when WHEN_OUTSIDE fires, else false.
*/
static
inline
bool
clip_line
(
int
&
x1
,
int
&
y1
,
int
&
x2
,
int
&
y2
)
{
{
int
temp
;
int
temp
;
...
@@ -197,6 +201,8 @@ static inline void clip_line( int& x1, int& y1, int& x2, int& y2 )
...
@@ -197,6 +201,8 @@ static inline void clip_line( int& x1, int& y1, int& x2, int& y2 )
WHEN_INSIDE
;
WHEN_INSIDE
;
}
}
}
}
return
false
;
}
}
...
@@ -220,7 +226,8 @@ static void WinClipAndDrawLine( EDA_Rect* ClipBox, wxDC* DC,
...
@@ -220,7 +226,8 @@ static void WinClipAndDrawLine( EDA_Rect* ClipBox, wxDC* DC,
xcliphi
+=
width
;
xcliphi
+=
width
;
ycliphi
+=
width
;
ycliphi
+=
width
;
clip_line
(
x1
,
y1
,
x2
,
y2
);
if
(
clip_line
(
x1
,
y1
,
x2
,
y2
)
)
return
;
}
}
GRSetColorPen
(
DC
,
Color
,
width
);
GRSetColorPen
(
DC
,
Color
,
width
);
...
@@ -673,7 +680,8 @@ void GRSCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int
...
@@ -673,7 +680,8 @@ void GRSCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int
xcliphi
+=
width
;
xcliphi
+=
width
;
ycliphi
+=
width
;
ycliphi
+=
width
;
clip_line
(
x1
,
y1
,
x2
,
y2
);
if
(
clip_line
(
x1
,
y1
,
x2
,
y2
)
)
return
;
}
}
...
...
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