Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TULIP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NUI
TULIP
Commits
b079b806
Commit
b079b806
authored
Nov 09, 2020
by
Nico Mack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modification allowing fillColour and/or strokeColour to be omitted
parent
429b9e17
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
TULIP/src/lu/list/itis/dkd/tui/widget/corona/ShapeCorona.java
...P/src/lu/list/itis/dkd/tui/widget/corona/ShapeCorona.java
+16
-8
TULIP/src/lu/list/itis/dkd/tui/widget/corona/builder/BaseShapeCoronaBuilder.java
...dkd/tui/widget/corona/builder/BaseShapeCoronaBuilder.java
+2
-2
No files found.
TULIP/src/lu/list/itis/dkd/tui/widget/corona/ShapeCorona.java
View file @
b079b806
...
...
@@ -101,18 +101,26 @@ public class ShapeCorona extends Corona {
return
;
}
Graphics2D
localCanvas
=
(
Graphics2D
)
canvas
.
create
();
AffineTransform
transform
=
this
.
getTransform
(
null
);
Shape
transformedShape
=
transform
.
createTransformedShape
(
shape
);
canvas
.
setPaint
(
fillColour
);
canvas
.
fill
(
transformedShape
);
if
(
fillColour
!=
null
)
{
localCanvas
.
setPaint
(
fillColour
);
localCanvas
.
fill
(
transformedShape
);
}
if
(
strokeColour
!=
null
)
{
localCanvas
.
setPaint
(
strokeColour
);
Stroke
oldStroke
=
canvas
.
getStroke
();
if
(
borderStroke
!=
null
)
localCanvas
.
setStroke
(
borderStroke
);
localCanvas
.
draw
(
transformedShape
);
localCanvas
.
setStroke
(
oldStroke
);
}
canvas
.
setPaint
(
strokeColour
);
Stroke
oldStroke
=
canvas
.
getStroke
();
if
(
borderStroke
!=
null
)
canvas
.
setStroke
(
borderStroke
);
canvas
.
draw
(
transformedShape
);
canvas
.
setStroke
(
oldStroke
);
localCanvas
.
dispose
();
}
// ---------------------------------------------------------------------------
...
...
TULIP/src/lu/list/itis/dkd/tui/widget/corona/builder/BaseShapeCoronaBuilder.java
View file @
b079b806
...
...
@@ -92,8 +92,8 @@ public abstract class BaseShapeCoronaBuilder<B extends BaseShapeCoronaBuilder<B>
*/
private
void
buildFromBootstrap
(
@Nullable
Element
rootElement
,
BootstrapContext
context
,
BootstrapCallback
callback
)
throws
BuildException
{
strokeWidth
=
BootstrappingUtils
.
getContentAsInteger
(
rootElement
,
Externalization
.
STROKE_WIDTH_NODE
,
BootstrappingUtils
.
OPTIONAL
,
0
,
context
);
fillColour
=
BootstrappingUtils
.
getContentAsColour
(
rootElement
,
Externalization
.
FILL_COLOUR_NODE
,
BootstrappingUtils
.
OPTIONAL
,
Color
.
GRAY
,
context
);
strokeColour
=
BootstrappingUtils
.
getContentAsColour
(
rootElement
,
Externalization
.
STROKE_COLOUR_ELEMENT
,
BootstrappingUtils
.
OPTIONAL
,
Color
.
GRAY
,
context
);
fillColour
=
BootstrappingUtils
.
getContentAsColour
(
rootElement
,
Externalization
.
FILL_COLOUR_NODE
,
BootstrappingUtils
.
OPTIONAL
,
null
,
context
);
strokeColour
=
BootstrappingUtils
.
getContentAsColour
(
rootElement
,
Externalization
.
STROKE_COLOUR_ELEMENT
,
BootstrappingUtils
.
OPTIONAL
,
null
,
context
);
}
/**
...
...
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