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
G
gs-core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
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
graphstream
gs-core
Commits
7c742914
Commit
7c742914
authored
Feb 26, 2014
by
Antoine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Searching a bug on negative width strokes
parent
33649a90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/org/graphstream/ui/swingViewer/util/GraphMetrics.java
src/org/graphstream/ui/swingViewer/util/GraphMetrics.java
+4
-2
No files found.
src/org/graphstream/ui/swingViewer/util/GraphMetrics.java
View file @
7c742914
...
...
@@ -187,7 +187,8 @@ public class GraphMetrics {
public
double
lengthToGu
(
double
value
,
StyleConstants
.
Units
units
)
{
switch
(
units
)
{
case
PX:
return
(
value
-
0.01f
)
/
ratioPx2Gu
;
//return (value - 0.01f) / ratioPx2Gu;
return
value
/
ratioPx2Gu
;
case
PERCENTS:
return
(
diagonal
*
value
);
case
GU:
...
...
@@ -231,7 +232,8 @@ public class GraphMetrics {
public
double
lengthToPx
(
double
value
,
StyleConstants
.
Units
units
)
{
switch
(
units
)
{
case
GU:
return
(
value
-
0.01f
)
*
ratioPx2Gu
;
//return (value - 0.01f) * ratioPx2Gu;
return
value
*
ratioPx2Gu
;
case
PERCENTS:
return
(
diagonal
*
value
)
*
ratioPx2Gu
;
case
PX:
...
...
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