Hi,

I am trying write a macro that draws elipse axes (Major and Minor) and measures them for each particle. My images need to have a scale set, however when I do it, it does not work properly and lines are drawn shifted agains the elipse (measurements are done well). If I do not set the scale both drawing and measurements are done well.

Below is some reproducible example with a macro from https://imagej.nih.gov/ij/macros/examples/DrawParticleEllipseAxis.txt

```
run("Blobs (25K)");
run("Set Scale...", "distance=50 known=30 unit=um"); // just for test
setAutoThreshold;
run("Set Measurements...", " area mean centroid fit ");
run("Analyze Particles...", "size=0 circularity=0 show=Ellipses display exclude clear ");
run("RGB Color");
for(i=0; i<nResults; i++) {
x=getResult('X',i);
y=getResult('Y',i);
d=getResult('Major',i);
a = getResult('Angle',i)*PI/180;
setColor("blue");
drawLine(x+(d/2)*cos(a),y-(d/2)*sin(a),x-(d/2)*cos(a),y+(d/2)*sin(a));
d=getResult('Minor',i);
a=a+PI/2;
setColor("red");
drawLine(x+(d/2)*cos(a),y-(d/2)*sin(a),x-(d/2)*cos(a),y+(d/2)*sin(a));
}
```

I tried to get a pixel size with **getPixelSize(unit, pixelWidth, pixelHeight)** and correct values obtained with **getResult()** but it did not help.

Thanks for any help