Commit 718994b4 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

usestadium shape for state

parent fff5c5ab
Pipeline #31334 passed with stage
in 12 minutes and 47 seconds
...@@ -8,8 +8,10 @@ minerva (15.1.0~beta.1) unstable; urgency=medium ...@@ -8,8 +8,10 @@ minerva (15.1.0~beta.1) unstable; urgency=medium
* Bug fix: miriam urls in new format * Bug fix: miriam urls in new format
(like: https://identifiers.org/kegg.compound:197020) are parsed properly for (like: https://identifiers.org/kegg.compound:197020) are parsed properly for
all know identifier types (#1359) all know identifier types (#1359)
* Bug fix: in SBGN-like view protein state should be drawn as stadium-shape
(#1357)
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 17 Aug 2020 16:00:00 +0200 -- Piotr Gawron <piotr.gawron@uni.lu> Tue, 18 Aug 2020 15:00:00 +0200
minerva (15.1.0~beta.0) unstable; urgency=medium minerva (15.1.0~beta.0) unstable; urgency=medium
* Small improvement: annotations are exported in SBGN extension that can be * Small improvement: annotations are exported in SBGN extension that can be
......
...@@ -71,8 +71,9 @@ public class ComplexSbgnConverter extends ComplexConverter { ...@@ -71,8 +71,9 @@ public class ComplexSbgnConverter extends ComplexConverter {
@Override @Override
Shape getStructuralStateShape(StructuralState state) { Shape getStructuralStateShape(StructuralState state) {
double arcSize = Math.min(state.getWidth(), state.getHeight()) ;
return new RoundRectangle2D.Double(state.getPosition().getX(), state.getPosition().getY(), state.getWidth(), return new RoundRectangle2D.Double(state.getPosition().getX(), state.getPosition().getY(), state.getWidth(),
state.getHeight(), 15, 15); state.getHeight(), arcSize, arcSize);
} }
} }
...@@ -85,8 +85,9 @@ public class ProteinSbgnConverter extends ProteinConverter { ...@@ -85,8 +85,9 @@ public class ProteinSbgnConverter extends ProteinConverter {
@Override @Override
Shape getStructuralStateShape(StructuralState state) { Shape getStructuralStateShape(StructuralState state) {
double arcSize = Math.min(state.getWidth(), state.getHeight());
return new RoundRectangle2D.Double(state.getPosition().getX(), state.getPosition().getY(), state.getWidth(), return new RoundRectangle2D.Double(state.getPosition().getX(), state.getPosition().getY(), state.getWidth(),
state.getHeight(), 15, 15); state.getHeight(), arcSize, arcSize);
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment