DrawLineArrow with fixed screen size?

args.Display.DrawPoint(point, PointStyle.Circle, radius, color) draws a circle that always have the same size on screen, independently to the zoom level.

I would like to achieve the same behavior with a line arrow, but args.Display.DrawLineArrow(line, color, thickness, size) gives me a fixed length line arrow in the design space, so whenever I zoom in or out the line arrow gets bigger (resp. smaller) on the screen.

The behavior I want to achieve is the same as the one used to show an object’s orientation in rhino viewport (aline arrows keep there screen size).

How can I scale the length of a line arrow to always appear with the same screen size ?

You’ll need to run this method first, then adjust the size of the thing you’re drawing.

David, I played with this method in various ways but could not managed to make fixed screen size linearrows. Any clues to sort this out ?

This is what I thought would work …

public static void Draw(DisplayPipeline pipeline, Point3d origin, Vector3d dir, bool isSelected)
{
    int alpha = 100;
    if (isSelected) alpha = 255;
    var white = Color.FromArgb(alpha, Color.White);

    double scale; // pixel per unit length in WorldXY
    pipeline.Viewport.GetWorldToScreenScale(origin, out scale);

    double lengthFor20pxOnScreen = 20 / scale;

    var line = new Line(origin, dir, lengthFor20pxOnScreen);
    pipeline.DrawLineArrow(line, white, 1, lengthFor20pxOnScreen * 0.25);
}