Line weight minimum?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Line weight minimum?
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
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?
Read here: http://livecode.wikia.com/wiki/PixelScale and http://livecode.wikia.com/wiki/UsePixelScaling
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Line weight minimum?
Thanks, Max, but this is for desktop. Should have mentioned that.
Craig
Craig
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Line weight minimum?
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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Line weight minimum?
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
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
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Line weight minimum?
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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Line weight minimum?
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....
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Line weight minimum?
@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
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