Page 1 of 1

Line weight minimum?

Posted: Fri Nov 03, 2017 3:15 pm
by dunbarx
I am implementing the creation, under script control, of CAD-like drawings in a project. Everything works fine, especially given the limited capabilities of LC in this regard.

But the minimum line weight (lineSize) of a LC control is 1 pixel, far heavier than I want.

I was hoping that creating an image of a line exported from a CAD program, where I have far greater flexibility in the choice of that property, would do the trick, but it seems that however thin the line in the source, once exported into LC the rendered image reverts back to 1 pixel.

I can make the rendered controls a little less visually "heavy" by increasing the blend level, but this is not what I really want.

So is there a way to have my cake after I have already eaten it? In other words, can LC support any sort of visible control that has a lineSize less than 1?

I do not mind kludges. Also, this might make me migrate to v.8 if a widget could perform this trick.

Craig Newman

Re: Line weight minimum?

Posted: Fri Nov 03, 2017 6:06 pm
by MaxV

Re: Line weight minimum?

Posted: Fri Nov 03, 2017 7:26 pm
by dunbarx
Thanks, Max, but this is for desktop. Should have mentioned that.

Craig

Re: Line weight minimum?

Posted: Sat Nov 04, 2017 4:52 pm
by jacque
Since the smallest unit on a display is one pixel, no app can draw a line thinner than that. The higher the screen resolution, the thinner the line will appear visually. Drawing programs accomplish the illusion using antialiasing, which you could apply to the line along with a slightly lighter color. That's about as close as you can get.

Re: Line weight minimum?

Posted: Sun Nov 05, 2017 2:52 am
by dunbarx
Jacque.

Thanks, as usual. It is all as I thought and feared.

Modifying the blendLevel produces a "lighter" appearance, just as a small color change does. Setting or clearing the antialiased does not seem to make a difference. I can use a little bit of those kludges, but not a lot, since a clean black line is expected in the "look" of the drawings I am producing.

But CAD programs can render a line far finer than LC can, very crisp, on the same monitor. If LC is limited to a single pixel, are not those programs as well? They have to be doing something different. I just wonder what.

I cannot be the only person that would like to have finer lineWeights...

Craig

Re: Line weight minimum?

Posted: Sun Nov 05, 2017 7:16 am
by jacque
I've heard people requesting that LC should implement sub-pixel positioning which I think is what you need but I'm not sure how that works.

Re: Line weight minimum?

Posted: Sun Nov 05, 2017 10:45 am
by FourthWorld
dunbarx wrote:
Sun Nov 05, 2017 2:52 am
But CAD programs can render a line far finer than LC can, very crisp, on the same monitor. If LC is limited to a single pixel, are not those programs as well? They have to be doing something different. I just wonder what.
CAD programs use a separate routine for rendering to the printer (on screen of course anything smaller than 1px is an antialiased approximation, as Jacque noted).

One way to achieve this in LC would be to have the printed version be larger than the on-screen representation, perhaps 4x or thereabouts for laser-printer quality output.

Whether you handle this on screen by replicating and scaling groups algorithmically (which is more or less what CAD programs do) or let LC handle it with the stack's scale property (with its incumbent tradeoffs) is the hard choice....

Re: Line weight minimum?

Posted: Sun Nov 05, 2017 4:06 pm
by dunbarx
@Richard.

Hmmm

The current raw output is drawn on a single card, roughly proportioned to an 8.5 x 11 sheet of paper.

Output from my gadget will always "print to PDF", which is how that output will be transmitted to the client. Once they have the PDF, they may print to paper, and always 8.5 x 11.

Intriguing idea might be making the card representation of every other element representation (there are many) 4x and the lines of interest 1x. Then see if I can print down to the "real" scale. Not sure if that makes sense...

Craig