Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sanbo_xyz
Gephi
提交
60056926
G
Gephi
项目概览
sanbo_xyz
/
Gephi
9 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gephi
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
60056926
编写于
12月 25, 2022
作者:
M
Mathieu Bastian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix issue with SVG lines
上级
7ba383e6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
15 deletion
+19
-15
modules/PreviewPlugin/src/main/java/org/gephi/preview/plugin/renderers/EdgeRenderer.java
...java/org/gephi/preview/plugin/renderers/EdgeRenderer.java
+19
-15
未找到文件。
modules/PreviewPlugin/src/main/java/org/gephi/preview/plugin/renderers/EdgeRenderer.java
浏览文件 @
60056926
...
@@ -534,14 +534,15 @@ public class EdgeRenderer implements Renderer {
...
@@ -534,14 +534,15 @@ public class EdgeRenderer implements Renderer {
String
path
=
String
.
format
(
String
path
=
String
.
format
(
Locale
.
ENGLISH
,
Locale
.
ENGLISH
,
"M %f,%f A %f,%f %d,%d %d,%f,%f"
,
"M %f,%f A %f,%f %d,%d %d,%f,%f"
,
h
.
x1
,
h
.
y1
,
h
.
x1
WithRadius
,
h
.
y1WithRadius
,
h
.
r
,
h
.
r
,
0
,
0
,
1
,
h
.
x2
,
h
.
y2
);
h
.
r
,
h
.
r
,
0
,
0
,
1
,
h
.
x2
WithRadius
,
h
.
y2WithRadius
);
edgeElem
.
setAttribute
(
"d"
,
path
);
edgeElem
.
setAttribute
(
"d"
,
path
);
edgeElem
.
setAttribute
(
"stroke"
,
svgTarget
.
toHexString
(
color
));
edgeElem
.
setAttribute
(
"stroke"
,
svgTarget
.
toHexString
(
color
));
edgeElem
.
setAttribute
(
edgeElem
.
setAttribute
(
"stroke-width"
,
"stroke-width"
,
Float
.
toString
(
getThickness
(
item
)
Float
.
toString
(
getThickness
(
item
)
*
svgTarget
.
getScaleRatio
()));
*
svgTarget
.
getScaleRatio
()));
edgeElem
.
setAttribute
(
"stroke-linecap"
,
"round"
);
edgeElem
.
setAttribute
(
edgeElem
.
setAttribute
(
"stroke-opacity"
,
"stroke-opacity"
,
(
color
.
getAlpha
()
/
255
f
)
+
""
);
(
color
.
getAlpha
()
/
255
f
)
+
""
);
...
@@ -604,6 +605,10 @@ public class EdgeRenderer implements Renderer {
...
@@ -604,6 +605,10 @@ public class EdgeRenderer implements Renderer {
public
final
double
bbh
;
public
final
double
bbh
;
public
final
double
astart
;
public
final
double
astart
;
public
final
double
asweep
;
public
final
double
asweep
;
public
final
Float
x1WithRadius
;
public
final
Float
x2WithRadius
;
public
final
Float
y1WithRadius
;
public
final
Float
y2WithRadius
;
public
Helper
(
public
Helper
(
final
Item
item
,
final
Item
item
,
...
@@ -664,6 +669,12 @@ public class EdgeRenderer implements Renderer {
...
@@ -664,6 +669,12 @@ public class EdgeRenderer implements Renderer {
if
(
targetRadius
!=
null
&&
targetRadius
<
0
)
{
if
(
targetRadius
!=
null
&&
targetRadius
<
0
)
{
Double
targetOffset
=
this
.
computeTheThing
(
r
,
(
double
)
targetRadius
);
Double
targetOffset
=
this
.
computeTheThing
(
r
,
(
double
)
targetRadius
);
angle2
+=
targetOffset
;
angle2
+=
targetOffset
;
x2WithRadius
=
(
float
)(
r
*
Math
.
cos
(
angle2
)
+
xc
);
y2WithRadius
=
(
float
)(
r
*
Math
.
sin
(
angle2
)
+
yc
);
}
else
{
x2WithRadius
=
x2
;
y2WithRadius
=
y2
;
}
}
// Source radius
// Source radius
...
@@ -672,6 +683,12 @@ public class EdgeRenderer implements Renderer {
...
@@ -672,6 +683,12 @@ public class EdgeRenderer implements Renderer {
if
(
sourceRadius
!=
null
&&
sourceRadius
<
0
)
{
if
(
sourceRadius
!=
null
&&
sourceRadius
<
0
)
{
Double
sourceOffset
=
this
.
computeTheThing
(
r
,
(
double
)
sourceRadius
);
Double
sourceOffset
=
this
.
computeTheThing
(
r
,
(
double
)
sourceRadius
);
angle1
-=
sourceOffset
;
angle1
-=
sourceOffset
;
x1WithRadius
=
(
float
)(
r
*
Math
.
cos
(
angle1
)
+
xc
);
y1WithRadius
=
(
float
)(
r
*
Math
.
sin
(
angle1
)
+
yc
);
}
else
{
x1WithRadius
=
x1
;
y1WithRadius
=
y1
;
}
}
bbx
=
xc
-
r
;
bbx
=
xc
-
r
;
...
@@ -706,19 +723,6 @@ public class EdgeRenderer implements Renderer {
...
@@ -706,19 +723,6 @@ public class EdgeRenderer implements Renderer {
}
}
return
2
*
Math
.
atan2
(
rt
/
2
,
x
);
return
2
*
Math
.
atan2
(
rt
/
2
,
x
);
}
}
private
Vector
computeCtrlPoint
(
final
Float
x
,
final
Float
y
,
final
Vector
direction
,
final
float
factor
,
final
Vector
normalVector
)
{
final
Vector
v
=
new
Vector
(
direction
.
x
,
direction
.
y
);
v
.
mult
(
factor
);
v
.
add
(
new
Vector
(
x
,
y
));
v
.
add
(
normalVector
);
return
v
;
}
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录