Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
c40c3fa0
Commit
c40c3fa0
authored
Jun 11, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed 'subtract' symbol combine mode
parent
47809857
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/render/symbol/viewer.cpp
src/render/symbol/viewer.cpp
+5
-5
No files found.
src/render/symbol/viewer.cpp
View file @
c40c3fa0
...
...
@@ -138,7 +138,7 @@ void SymbolViewer::highlightPart(DC& dc, const SymbolPart& part, HighlightStyle
void
SymbolViewer
::
combineSymbolPart
(
const
SymbolPart
&
part
,
DC
&
border
,
DC
&
interior
,
bool
directB
,
bool
directI
)
{
// what color should the interior be?
// use black when drawing to the screen
unsigned
char
interiorCol
=
directI
?
0
:
255
;
Byte
interiorCol
=
directI
?
0
:
255
;
// how to draw depends on combining mode
switch
(
part
.
combine
)
{
case
PART_OVERLAP
:
...
...
@@ -147,7 +147,7 @@ void SymbolViewer::combineSymbolPart(const SymbolPart& part, DC& border, DC& int
break
;
}
case
PART_SUBTRACT
:
{
border
.
SetLogicalFunction
(
wxAND
);
drawSymbolPart
(
part
,
&
border
,
&
interior
,
0
,
~
interiorCol
,
true
,
tru
e
);
drawSymbolPart
(
part
,
&
border
,
&
interior
,
0
,
~
interiorCol
,
directB
,
fals
e
);
border
.
SetLogicalFunction
(
wxCOPY
);
break
;
}
case
PART_INTERSECTION
:
{
...
...
@@ -172,7 +172,7 @@ void SymbolViewer::combineSymbolPart(const SymbolPart& part, DC& border, DC& int
}
}
void
SymbolViewer
::
drawSymbolPart
(
const
SymbolPart
&
part
,
DC
*
border
,
DC
*
interior
,
unsigned
char
borderCol
,
unsigned
char
interiorCol
,
bool
directB
,
bool
clear
)
{
void
SymbolViewer
::
drawSymbolPart
(
const
SymbolPart
&
part
,
DC
*
border
,
DC
*
interior
,
Byte
borderCol
,
Byte
interiorCol
,
bool
directB
,
bool
clear
)
{
// create point list
vector
<
wxPoint
>
points
;
size_t
size
=
part
.
points
.
size
();
...
...
@@ -181,8 +181,8 @@ void SymbolViewer::drawSymbolPart(const SymbolPart& part, DC* border, DC* interi
}
// draw border
if
(
border
)
{
// white/black
border
->
SetBrush
(
Color
(
borderCol
,
borderCol
^
(
directB
?
128
:
0
),
borderCol
));
// white/black
or, if directB white/green
border
->
SetBrush
(
Color
(
borderCol
,
(
directB
&&
borderCol
==
0
?
128
:
borderCol
),
borderCol
));
border
->
SetPen
(
wxPen
(
*
wxWHITE
,
(
int
)
rotation
.
trS
(
border_radius
)));
border
->
DrawPolygon
((
int
)
points
.
size
(),
&
points
[
0
]);
...
...
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