Skip to content

Commit

Permalink
2023.03.13 (1.54d9; Help>Examples>Macro>Turtle Graphics)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasband committed Mar 14, 2023
1 parent 3e5ba95 commit 779b27c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion ij/ImageJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class ImageJ extends Frame implements ActionListener,

/** Plugins should call IJ.getVersion() or IJ.getFullVersion() to get the version string. */
public static final String VERSION = "1.54d";
public static final String BUILD = "5";
public static final String BUILD = "9";
public static Color backgroundColor = new Color(237,237,237);
/** SansSerif, 12-point, plain font. */
public static final Font SansSerif12 = new Font("SansSerif", Font.PLAIN, 12);
Expand Down
1 change: 1 addition & 0 deletions ij/Menus.java
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ public static Menu getExamplesMenu(ActionListener listener) {
addExample(submenu, "Spiral Rotation", "Spiral_Rotation.ijm");
addExample(submenu, "Curve Fitting", "Curve_Fitting.ijm");
addExample(submenu, "Colors of 2021", "Colors_of_2021.ijm");
addExample(submenu, "Turtle Graphics", "Turtle_Graphics.ijm");
submenu.addActionListener(listener);
menu.add(submenu);

Expand Down
19 changes: 12 additions & 7 deletions ij/gui/Arrow.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public void draw(Graphics g) {
flipEnds();
}
Shape shape = getShape();
if (shape==null)
return;
Color color = strokeColor!=null? strokeColor:ROIColor;
if (fillColor!=null) color = fillColor;
g.setColor(color);
Expand Down Expand Up @@ -214,13 +216,16 @@ private void calculatePoints() {
}

private Shape getShape() {
Shape arrow = getPath();
BasicStroke stroke = new BasicStroke((float)getStrokeWidth(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
Shape outlineShape = stroke.createStrokedShape(arrow);
Area a1 = new Area(arrow);
Area a2 = new Area(outlineShape);
try {a1.add(a2);} catch(Exception e) {};
return a1;
try {
Shape arrow = getPath();
BasicStroke stroke = new BasicStroke((float)getStrokeWidth(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
Shape outlineShape = stroke.createStrokedShape(arrow);
Area a1 = new Area(arrow);
Area a2 = new Area(outlineShape);
a1.add(a2);
return a1;
} catch(Exception e) {};
return null;
}

private ShapeRoi getShapeRoi() {
Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/filter/Analyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ void measurePoint(Roi roi) {
PointRoi pointRoi = roi instanceof PointRoi?(PointRoi)roi:null;
for (int i=0; i<p.npoints; i++) {
int position = 0;
if (pointRoi!=null)
if (pointRoi!=null && p.npoints>1)
position = pointRoi.getPointPosition(i);
ImageProcessor ip = null;
if (stack!=null && position>0 && position<=stack.size())
Expand Down
17 changes: 10 additions & 7 deletions release-notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
</head>
<body>

<li> <u>1.54d5 11 March 2023</u>
<li> <u>1.54d9 13 March 2023</u>
<ul>
<li> Thanks to Norbert Vischer, added added an 'include'
statement to the macro language
<a href="http://imagej.net/ij/macros/TurtleGraphics2.ijm">Turtle Graphics Example</a>.
<li> Thanks to Norbert Vischer, added an 'include'
statement to the macro language. For an example,
use the <i>Help&gt;Examples&gt;Macro&gt;Turtle Graphics</i>
command.
<li> Thanks to Wilco Kasteleijn, fixed a bug
with opening 16-bit RGB PNGs
(<a href="https://imagej.net/ij/images/Jupiter-16-bit-RGB.png">example</a>).
Expand All @@ -19,14 +20,16 @@
images.
<li> Fixed GUI scaling of <i>Image&gt;Color&gt;Show LUT</i>
plots.
<li> Fixed bug that limited Minimum and Maximum for 16-bit images
in the Brightness/Contrast dialog to 0 and 65,535.
<li> Thanks to 'librethinker', fixed bug that limited Minimum and Maximum for
16-bit images in the Brightness/Contrast dialog to 0 and 65,535.
<li> Thanks to 'KlMichel', fixed bug with ROI Manager "Multi Measure"
command and point selections.
</ul>

<li> <u>1.54c 6 March 2023</u>
<ul>
<li> Thanks to Jerome Mutterer, added support for
<a href="http://wsr.imagej.net/macros/TurtleGraphics.ijm">Turtle Graphics</a>.
<a href="http://wsr.imagej.net/macros/Library.txt">Turtle Graphics</a>.
<li> Thanks to Eugene Katrukha, re-implemented the
<i>Edit&gt;Selection&gt;Fit Spline</i> command
using Haysn Hornbeck's freely available
Expand Down

0 comments on commit 779b27c

Please sign in to comment.