Re: Drawing smooth curved vectors - is it even possible?
Posted: Mon Sep 23, 2024 5:06 pm
That sounds like a very odd claim.You mentioned there are more pixels on a high-res screen than there are coordinates to describe them.
Questions and answers about the LiveCode platform.
https://forums.livecode.com/
That sounds like a very odd claim.You mentioned there are more pixels on a high-res screen than there are coordinates to describe them.
I think the point is that the ovals don't have coordinate points, they are generated in a different way and the effective points of an oval is a crude approximation - hence "jaggies". All of this is fine with straight lines, but for a true curve the effective points unfortunately doesn't seem to cut it.dunbarx wrote: Mon Sep 23, 2024 4:38 pm Anyway, if that is so, then what are the "effective points"? Simply as many of the "accessible" screen points as can be delineated along a bezier, with many actually drawn points being skipped over in the description of that path?
And that path is hidden from us?
Craig
Well, surprise, surprise . . .If you zoom in you still get jaggies.
Not only is this post entirely unhelpful, it is not fully correct: You can generate curves with an oval tool and you can do this in LCB.richmond62 wrote: Mon Sep 23, 2024 5:25 pmWell, surprise, surprise . . .If you zoom in you still get jaggies.
LiveCode cannot really manage Bezier curves . . .
I believe it has to do with the screen resolution, which can be almost anything depending on the device, particularly on mobile. For consistency, LC translates screen pixels to standard measurements based on (I think) 72 dpi or maybe 96 dpi on Windows. Without translation you'd have to script every dimension and position yourself dynamically based on the resolution of the current device. That is, "100, 100" might be an inch down and right on a low resolution computer but only a fraction of an inch on a high resolution display.dunbarx wrote: Mon Sep 23, 2024 4:38 pm You mentioned there are more pixels on a high-res screen than there are coordinates to describe them. In other words, there are real physical screen pixels that cannot be described with an "x,y" description, where both "x" and "y" are integers. That a small black dot can be placed on such pixels by the engine, but such a pixel cannot be described by two integers. It seems odd to me that an actual physical LED triple can exist that way, and the engine has more information about such pixels than we do. How do it know?
I get that, and it makes sense. But it seems that a simple property that scales the current screen resolution should be available if desired.For consistency, LC translates screen pixels to standard measurements based on (I think) 72 dpi or maybe 96 dpi on Windows.
We have scalefactor to adjust the entire stack window on any device. For iOS there's iphoneUseDeviceResolution which might be relevant but I've never tried it. For all OSs we have usePixelScaling but I haven't used that one either.dunbarx wrote: Tue Sep 24, 2024 11:03 pm But it seems that a simple property that scales the current screen resolution should be available if desired.
You imply that such a thing already exists, of course. But my issue is that somehow there should be access within LC to use the "finer" pixels.
I have never used those either; I never need to render for "artistic" purposes. But reading the several related properties, it does not seem that one can increase what LC seems to insist to use (is capable of using?) as opposed to what the screen may offer. I had hoped there was a way to do that....we have usePixelScaling