5 ms·
He touches on line graphics as having the same problem rendering. I run into that when making strip charts. In general, the higher level your graphics API, the
by jws 4y ago
He touches on line graphics as having the same problem rendering. I run into that when making strip charts.
In general, the higher level your graphics API, the harder it is to get horizontal and vertical lines to draw on the physical pixels. At the frame buffer level it is trivial. Cocoa and UIKit it is possible with some effort. SwiftUI it is impossible (you will end up using the escape hatch to Cocoa or UIKit). HTML is hopeless.
When printing meant writing some Postscript it was a little work, but doable. Getting it onto a printer through a modern printer API is essentially impossible.
Fundamentally this is why most graphs you see online look like they were drawn with a worn out felt tip marker. It hides the sins at the expense of limiting data density and precision.
- galangalalgol 4y agoIf you netcat a ps file to the ip of the printer that should still work yes?
- bno1 4y agoSounds like you want font hinting but for vector graphics.
- naikrovek 4y ago> When printing meant writing some Postscript it was a little work, but doable. Getting it onto a printer through a modern printer API is essentially impossible. Brother printers (at least some) support BR-script which is Postscript without the trademark violation. It's supported at the driver level, I think, which would render the PS on the PC then send the rendered document as one of the hardware-supported languages like PCL. I mention this as an interesting bit of info, and not to refute anything you said
- kllrnohj 4y agoIt's hard in HTML due to the clunky way it handles density scaling. You wont have any issue doing razer sharp pixel alignment on systems that are natively density aware, like Android, as then the rendering stack can just work in actual pixels like it should, and density handling is done by the layout system instead. So it's not about the number of layers of abstraction or general "high level"ness, but rather if those abstractions are trying to cover up mistakes made elsewhere.
- Cullinet 4y agoThank you for your report. I have to represent scaled graphs also online via browsers and had been curious about the implementation of scaling through APIs and ultimately browser based drivers. My concern is that the human brain is very much better at comprehending spatial dithering, critical for e.g. price trend extrapolation, than the open literature gives credit. Vital research by CSERIAC at Wright Patterson was declassified to sell the post SDI COTS reboot, but heavily reclassified after 9/11. This has been to the great detriment of the human computer interaction research community which really didn't survive into this century.
- cma 4y agoCan you unacronym this?
- tmtvl 4y agoI think you know what APIs are, CSERIAC is the Crew System Ergonomics Information Analysis Center, SDI is the Strategic Defence Initiative, and COTS means Commercial Off The Shelf, as in literally buying equipment from regular commercial vendors rather than doing the whole massive DoD contract thing.
- GuB-42 4y agoAnd DoD is the Department of Defense ;) About acronyms, I remember a company that won a bid for a company I worked with. Part of the reason they won is that their proposal was very clear, and one of the stated reason was the lack of acronyms. To this day, I try to avoid using acronyms as much as possible. I also remember an argument at another company, someone was complaining of problems on the "VMS", the other was calling bullshit. It took a few minuted before they realized they were talking about two different things with the same acronym. There are only 17576 3-letter acronyms, if 200 of these are used, the chance of a collision is about 2/3 (see: birthday paradox), and that's assuming a uniform distribution, in reality, it is worse. Misunderstandings are inevitable.
- 4y ago
- bombcar 4y agoReminds me of this: http://www.ericbrasseur.org/gamma.html?i=1 http://www.ericbrasseur.org/gamma.html?i=1
- xnzakg 4y agoThis was fun, at first I was wondering why none of the examples were working properly until I remembered I was using a 4k screen on a windows machine, which set the scaling to 150% by default. After setting the scaling to 100% the demos suddenly made sense. Also, interesting how changing the gamma setting on my screen also changed the results...
- omeze 4y agoI don't quite understand this (not a graphics dev) -- if you have the ability to get the viewport size in a browser, and if the display is running at its native resolution, why do you not have pixel-perfect accuracy?
- kevin_thibedeau 4y agoFloats get rounded to an off-by-one pixel.
- deleted 4y ago[deleted]
- zamadatix 4y agoI'd be amazed to see a resolution/dpi combo that results in a 1 pixel error from rounding and equally amazed that it isn't far from the same combo that would cause a rounding error outside of a browser.
- jws 4y agoI find it to more about a thin line being rendered as a little bit of color in two adjacent lines of pixels. The result is a messy blur instead of a crisp line. If any layer of the libraries and APIs doesn’t pass up the coordinate system mappings, like say a window doesn’t report its exact screen space position to its content, then you lose access to the information to register the pixels precisely.
- zamadatix 4y agoThat can definitely happen between but as a loss of information between layers that don't support DPI fully (e.g. Windows 7 type DPI information which isn't per screen aware) or are intentionally ignoring physical pixel information (e.g. percentage based sized/positioned elements) not float precision loss. Float precision loss is definitely a thing but even a 32 bit float is integer perfect to 8,388,608 meanwhile a 7,640 pixel screen (1,000 times smaller) is considered extraordinarily large. Fractions close to 0 (such as APIs that use a 0-1 range for the screen or DPI represented a a percentage of a standard value) have a similar accuracy. I'm not even sure on Windows there is a way to render anything
- deleted 4y ago[deleted]