Login  Register

Re: draw a vertical line - malfunctioning??

Posted by Gabriel Landini on Dec 28, 2007; 3:45pm
URL: http://imagej.273.s1.nabble.com/Plugin-announcement-Orientation-measurements-tp3697674p3697681.html

On Friday 28 December 2007, Rewald, Boris wrote:
> It is not possible to create a vertical line (straight line function, 90°)
> with the "Draw" (Strg D) function, but i can draw circles, freehand ect ...
> Is this a bug or normal?

Hi,

Not sure what is the "Draw" (Strg D) function.
I think that you may be applying the wrong functions.

Have a look at:
http://rsbweb.nih.gov/ij/developer/macro/functions.html


I think that you need:

drawLine(x1, y1, x2, y2)
 Draws a line between (x1, y1) and (x2, y2). Use setColor() to specify the
color of the line and setLineWidth() to vary the line width.

or

makeLine(x1, y1, x2, y2)
 Creates a new straight line selection. The origin (0,0) is assumed to be the
upper left corner of the image. Coordinates are in pixels. With ImageJ 1.35b
and letter, you can create segmented line selections by specifying more than
two coordinate, for example makeLine(25,34,44,19,69,30,71,56).

or

makeLine(x1, y1, x2, y2, lineWidth)
 Creates a straight line selection with the specified width. Requires 1.38u.
See also: getLine.

Cheers,

G.