Skip to content
Snippets Groups Projects
Commit 410cdf59 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

gene shape was using ints for borders but it should be double

parent 54a2a7f7
3 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!442Problem with exporting to celldesigner and parsing from celldesigner,!440Problem with exporting to celldesigner
......@@ -6,6 +6,7 @@ import java.awt.geom.AffineTransform;
import java.awt.geom.GeneralPath;
import java.awt.geom.PathIterator;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import org.apache.log4j.Logger;
......@@ -62,8 +63,7 @@ public class GeneCellDesignerAliasConverter extends AbstractCellDesignerAliasCon
private Shape getGeneShape(Element alias) {
if (!isSbgn()) {
Shape shape;
shape = new Rectangle(alias.getX().intValue(), alias.getY().intValue(), alias.getWidth().intValue(),
alias.getHeight().intValue());
shape = new Rectangle2D.Double(alias.getX(), alias.getY(), alias.getWidth(), alias.getHeight());
return shape;
} else {
GeneralPath path = new GeneralPath(GeneralPath.WIND_EVEN_ODD);
......@@ -97,8 +97,8 @@ public class GeneCellDesignerAliasConverter extends AbstractCellDesignerAliasCon
@Override
public Point2D getCoordinatesByPosition(Element element, Double pos, Double modificationWidth) {
double x = element.getX() + element.getWidth() * pos;
x = Math.max(element.getX() + modificationWidth/2, x);
x = Math.min(element.getX() + element.getWidth() - modificationWidth/2, x);
x = Math.max(element.getX() + modificationWidth / 2, x);
x = Math.min(element.getX() + element.getWidth() - modificationWidth / 2, x);
Point2D result = new Point2D.Double(x, element.getY());
return result;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment