This commit is contained in:
2018-04-27 15:28:46 +02:00
parent 3fb306c90d
commit 4dae79a3ca
5 changed files with 236 additions and 162 deletions

View File

@@ -119,7 +119,7 @@ public class Sample extends DeviceBase {
}
int getNormalDrawSize() {
return (int)((getSize().getWidth() / getPuck().getSize().getWidth()) * getPuck().getDrawSize());
return getPuck().getDrawSize(getSize().getWidth() );
}
int getDrawSize() {
int ret = getNormalDrawSize();
@@ -130,13 +130,7 @@ public class Sample extends DeviceBase {
}
Point getDrawPosition() {
Point puckCenter = getPuck().getDrawPosition();
int puckDrawSize = getPuck().getDrawSize();
DimensionDouble puckSize = getPuck().getSize();
int size = getDrawSize();
PointDouble pos = getPuck().getSamplePosition(this);
return new Point( (int) ((pos.x / puckSize.getWidth())* puckDrawSize/2 + puckCenter.x) ,
(int) ((pos.y / puckSize.getHeight())* puckDrawSize/2 + puckCenter.y) );
return getPuck().getDrawPosition(getPuck().getSamplePosition(this));
}