Rollo62
Members-
Content Count
1812 -
Joined
-
Last visited
-
Days Won
23
Everything posted by Rollo62
-
[Image32 - SVG] Is there a feature to control the XmlTree ?
Rollo62 replied to Rollo62's topic in Delphi Third-Party
@angusj Thanks a lot. Yes the properties can be set in the Elements DrawData dynamically, works nicely. Unfortunately the missing link right now is how to identify the desired element(s) in the first place. Either a "FindById" function, or some kind of "Id" property in the TElement might help to identify and grab the desired element. Maybe I can find that in a future releases one day., I'm curious to see where this nice library might evolve into, I see a huge potential. -
Not sure how do you calculate that ? I just checked prices for a 2.5" SSD vs. HDD 1TB. Lets say 1TB SSD roughly 180 EUR vs. HDD roughly 65 EUR, which makes an SSD up-cost of 115 EUR. If I only assume the SSD vs. HDD brings minimum 5 min. / day of saved working (compile/loading/saving) time, then this summarize to approx. 5 min * 200 (active working) days / year = 1000 min / year = 16.7 hours / year of saved working time. Usually I would expect you have hourly working cost of >= 25 EUR at minimum, this would mean minimum working cost savings of 417 EUR / year vs. SSD cost-up of 115 EUR. This is only for one year, usually I would calculate the lifetime of >= 3 years, so the ratio gets better every year. It really doesn't make sense to save money on the wrong side.
-
I am wondering why that is still the case, from my prediction SSD should have been breaking even much earlier. https://blocksandfiles.com/2021/01/25/wikibon-ssds-vs-hard-drives-wrights-law/ Accoding to this blog, we still have to wait some more time. On the other hand, I think the SSD/HDD pricing has many political components in it, so both parties try to keep prices high as long as possible, of course.
-
[Image32 - SVG] Is there a feature to control the XmlTree ?
Rollo62 replied to Rollo62's topic in Delphi Third-Party
@angusj Thanks for the answers, yes I have seen that it has included a fast reader/parser basically. So the best possible approach would be to re-load complete SVG's from string, while controlling visibility and change properties outside of the SvgReader, by a standard XML tree object. I will check into that direction then. -
StrToFloat () all combinations of decimal separator and lang. settings
Rollo62 replied to bernhard_LA's topic in Algorithms, Data Structures and Class Design
I agree to that. Maybe the best way, to catch any of the remaining formats is, to seek the string reversely, from end to start. 1. Then take the last separator (first found when searching reversely) in the string, as preliminary decimal separator. 2. If there are more separators in the string, they could be safely ignored, they can only be thousands separators. 3. If separator 1.) is the only separator in the string, only then you might run into an unclear situation, as you explained above. 4. But you still could try to count the number of decimals after the last separator if there are <> 3, then you still could be very sure that it's NOT a thousands separator, but a decimal separator. 5. Even if you have >= 6 decimals, it should be a decimal separator, as I rarely expect having a million separator without a thousands separator. ( Still somebody could do nasty things like that ) 6. Only if there are exactly 3 decimals, then you better know your format source. -
That looks OK for me, I would do the same. What I meant was using the TPath, with a punched-out center hole and using its Bitmap fill property with effects. I just clicked a roughly demo together, only tested under Win32, see enclosed. This is just as proof of concept, it seems to work well, but needs some refinements of course. This would allow to use any masked path, but of course requires a bitmap copy right now. T418_ImgHole_001.zip
-
If you have a video scanning as background, you could simply add 4 TRectangle with opacity around the center, maybe controlled by margins. Then you have darkened frame around. Instead of Rect you could also check a filled TPath. Probably you can work with filter effects directly on the background image, but i think you need some kind of custom blur filter.
-
What OS are you looking for ? Generally you can check this: https://github.com/andrea-magni/ScannerMApp https://github.com/flydev-fr/ZXing.Delphi.Demo Winsoft "Camera for IOS", "Camera for Android" + "OBR ML Library for Android". https://delphiworlds.com/2020/11/native-camera-ios-android/ Generally I would try to use the bulit-in system barcode scanner, not trying to create my own one.
-
Image32 - 2D graphics library (open source freeware)
Rollo62 replied to angusj's topic in I made this
We have this nice CPU in common, but I wouldn't call it a PC at all- 42 replies
-
- graphics
- cross-platform
-
(and 2 more)
Tagged with:
-
Image32 - 2D graphics library (open source freeware)
Rollo62 replied to angusj's topic in I made this
I think he speaks from a point on timespace in a distant future.- 42 replies
-
- graphics
- cross-platform
-
(and 2 more)
Tagged with:
-
Do You mean raster images, that have been "vectorized", or any Adobe SVG in general ? Have you figured out what exactly went wrong in those Adobe files ? Maybe there are easy ways to re-convert it ( like open/save with InkScape) to make them running, I will try to check that later.
-
Delphi 10.4.2 & TEdgeBrowser ( & TWebBrowser in Edge mode)
Rollo62 replied to aehimself's topic in Tips / Blogs / Tutorials / Videos
I installed the WebView2 loader via GIT, and yes I copied the right 32/64 Bit DLL version close to the EXE. First of all, I am not sure if the normal, Windows 10 Edge works (as chromium), it canot be used in EdgeMode in my VM. So I thought OK, this is not yet ready, so I have to install the "Canary" channel separately, still not working. Then I read about the "Runtime" version, and installed that too, still not working. You are right, I considered 32/64 Bit issues again (my EXE is 32), and 'I re-installed all Loader 32/64, Canary 32/64 und Runtime 32/64 accordingly, still not working. I thought, maybe a reboot needed, still not working. Anyhow, thats too much hazzle anyway, so I will stay with Cef4Delphi, it is more advanced in my opinion. I wanted to check if Edge is comparable meanwhile, I'm afraid it's not. The goal was to get rid of the 200MB Chromium DLL's, but the Edge DLL's are not less anyway (only should be better integrated in the OS). I can work with TWebBrowser in normal mode, but its not able to switch to EdgeMode. If I use TEdgeBrowser, then I cannot work either, so I ask myself what am I missing here ? Regarding the VM, I have some VC redistributables, and usually the latest Win10 version, .NET version, so what else could go wrong ? -
Delphi 10.4.2 & TEdgeBrowser ( & TWebBrowser in Edge mode)
Rollo62 replied to aehimself's topic in Tips / Blogs / Tutorials / Videos
Old post, yeah, but current topic. I decided to give Edge WebView2 another chance, since I have read here and there something. In the end I've lost half a day without success, that is really bitter. Trying our all this Canary, GetIt, Runtime stuff in myriad ways, nothing is really complete still. So I'll better stay with Cef4D then, or does anybody have a roadmap or real foolproof solution ? I give up (again). -
@vfbb Thanks for that great piece of code. I was trying around a bit, to get closer to Skia and its capabilities. As side-effect I felt free to add a "Playground" for your demos, so to make them more easy to handle. Please find the source enclosed ( I had to remove the binaries, so they just needed to be completed from your repository ). I always think its very important to have a lot of plug-and play demos available, but I see you are at initial V1.0 version right now. So I hope this little playground might help to find more friends for your library soon. Skia SVG support: What I have found distracting is that Skia cannot load all SVG's. Please check and try the demo at button T10, which first hit of T10 rescales to the SVG size, and then the second hit of T10 shows the image. I have several samples, you need to uncomment and recompile, but only a few work. //LSVGStream := TSKFileStream.Create( '..\..\..\_Assets\demo_highpoly.svg' ); // 'assets/samples/porsche.svg'); LSVGStream := TSKFileStream.Create( '..\..\..\_Assets\beach.svg' ); //LSVGStream := TSKFileStream.Create( '..\..\..\_Assets\book.svg' ); //LSVGStream := TSKFileStream.Create( '..\..\..\_Assets\leaves.svg' ); //LSVGStream := TSKFileStream.Create( '..\..\..\_Assets\bmw.svg' ); //LSVGStream := TSKFileStream.Create( '..\..\..\_Assets\butterfly.svg' ); Most of them get back with size (0, 0), and I Show "Error" message. Do you have any idea what is wrong with these SVG, I can see them well rendered in many other viewers ? I thought Skia should be advanced in rendering anything, or am I wrong ? T414_Skia4D_003.zip
-
10.4.1+ Custom Managed Records usable?
Rollo62 replied to Darian Miller's topic in RTL and Delphi Object Pascal
I would consider that only for where it may have a reasonable purpose. A SmartPointer like record would make sense, from my point of view. Or record as SmartGuard for system resources, to ensure try/finally encapsulation. Of course anything after careful testing under various situations. I haven't checked all that QC entries, but I assume there should be no random-like errors popping up. -
Stupid question, is it possible that Win and Macos have different format setting ? Should be standard in both, but maybe isnt.
-
HtmlComponents: Howto create a page (electronic paper), exactly filling A4 size ?
Rollo62 posted a topic in Delphi Third-Party
Hi there, I would like to use the wonderful HtmlComponents HtmlEditor for creating a single or multiple page PDF documents, as eDocument, with sections (header/footer) and/or background image(s)/icons, that covers the whole page to simulate a border-less PDF printout. This shall be used like a normal, printed business paper, invoice, etc. The result could look like that, but of course even more fancy and colorful too: In some overlay areas there should be the normal text, which can be entered in the document, so that the whole page might be converted to PDF, and sended as eInvoice or other ePaper. The whole documents would act as template for the editor. The question is how could that be arranged best, with HtmlComponents, since I would like to use HTML-based documents right from the start. One option would be to automate MsWord/LibreWriter, with templates, but I prefer the HTML as more future-ready and simple solution. From HTML5 / CSS, I know that they were not so good to define such fixed sized, pixel-perfect, pages, especially when pagination comes into mind, like for standard A4 pages ( 210 x 297 mm ). There could be one background image behind the whole A4 page, but this would be quite large. If I use several, separate footer, header sections, then they may drift off A4 size easily. So I wonder how I could make use of HtmlComponents, and HtmlEditor, to get this solved. Shall I use HTML itself, to define everything, or can HrmlEditor help to produce that. Maybe some of you would propose the reporting features in the first place, but I would like to keep the document as manually editable page too, just like maybe MsWord, LibreOffice templates would work. If that can be solved, how can I convert the whole thing as border-less PDF ? I had not yet worked too much with advanced layout options of the HtmlEditor, but it brings all I should have, in my opinion. Only how do I get started best, with a pre-printed template with header, footer, logo, body, etc.. ? -
HtmlComponents: Howto create a page (electronic paper), exactly filling A4 size ?
Rollo62 replied to Rollo62's topic in Delphi Third-Party
Thanks I will check that. But the image also shows that the bottom has a gap to the papersize. The image is exactly 210x297mm and would be exactly 1 page. Ive played around with HTML + CSS in VsCode and browser , which has many options, but also issues with print pages. Flexbox is nice, but is rescaling dynamically,not perfect for fixed layouts. Tablet does better, and allow good structuring of the page, quite like Excel, But is heavy too. If even browsers have problems to render that, I doubt that HtmlEditor can handle that well. The demos included table definition, but it seems there were more options in earlier versions. Just a tummy feeling, but was Table handling changed in the last versions? I remember it could do better before. Can HtmlEditor work in complex flexbox layouts? I doubt that, at least I see only table as a workable way. -
HtmlComponents: Howto create a page (electronic paper), exactly filling A4 size ?
Rollo62 replied to Rollo62's topic in Delphi Third-Party
@Alexander Sviridenkov Thanks for the explanation, but unfortunately I don't get to a working sample with the HtmlComponents yet. I use the current version V440, inside the VCL-Editor-Demo. Inspired from this page-like HTML here, this is the live-view, I've tried to add the background images as header/footer. This doesn't work well in HTML, I've tried different examples from W3C, etc. What is working in the right direction, at lease under HTML, is to put a whole DinA4 PNG as background, which of course eats more memory. That would be acceptable. I've used the DinA4 sheet from the link above, and combined the separate CSS all in the local style of the index.html page. And I "designed" a sample business A4-paper here, which is loaded from URL in the sample. You can check the sample 003.zip enclosed, in the browser. I included all CSS and images in the HTML itself, or via link. When I load that into the HtmlEditor, I see different page sizes and page breaks, and not really the same results as in browsers. Maybe you can have a look at the sample, what can be the problem and what could be optimized here to get the same view as in normal browsers. Of course this is a nice view in browsers, but also there the complete print doesn't work, they leave out the background image, and print only the text, when I try to /file/print/to pdf. I think the culprit is maybe the media query "print" inside the CSS, but have not really checked this. Anyway, my goal is to have that very same document view, printed to PDF. 003.zip -
I would consider closing requests by TMessage and TMessageManager, to keep all units as much decoupled as possible ( not sure if you work with a recent version of the IDE, but I think its in for long time already ).
-
It seems to be good enough for TMS VsCode, and this IS Pascal language too. The results and proposals of the AI looks very much OK, like the email verification and RegEx. Focussing on the "Pascal" question, you better do not underestimate the current AI's. I think they are quite able, to convert e.g. Javascript, C++, etc. to valid Delphi. They show a high grade of creativity, and I would say they even might pass a turing test.
-
If restructuring and modularizing the JCL would make sense, I would be interested, at least I'm doing that more or less on a daily base. The best approach in my opinion would be to identify the domains that should be separated, and then try to unbind them from the rest of the of the JCL. So that each domain best of all can be used standalone, without too much headaches. What is missing for me is a useful discussion about those "domains", which one makes sense, which one are obsolete. Who could start providing such list, I'm not too deep in the JCL right now ? Another question is who is responsible for the JCL right now and in the future, and what about copyrights, etc. ? Maybe the initiative should be started from the original maintainers first, or at least with their common understanding and approval. I assume the project will end up as a complete rewrite of the JCL, so would be good to have all permission and good support to do so. To have another good library that will be divided into many redundant forks by separate, different maintainers with different goals, makes no sense to me either.
-
I think Android offers a lot of options for screen mirroring. https://fossbytes.com/android-screen-mirroring-apps-pc/ https://www.howtogeek.com/269093/how-to-cast-your-windows-or-android-display-to-a-windows-10-pc/ https://techviral.net/best-apps-to-mirror-android-screen-to-pc/
-
Thats very good that someone takes care of this nice peace of code, but I'm afraid the golden days of Jcl had been gone for a while. Meanwhile Delphi, System, RTL, RTTI has improved much, and also added their own native Linux cross-platform support. What I would suggest is to check and cleanup the code a little, to find the golden nuggets that were worth to be unraveled ( I'm sure there are many ). Who is using Jcl / Jvcl actively, who can give some hints ? If Jedi would not be such a big unsorted mess I would like to look deeper into this too, but I always have the bad feeling that it brings more overhead than it brings useful features. Maybe you have some deeper insights, and you can explain what features especially should stay and which one should be separated ? To have a general, external library that could fill some gaps of Delphi would be a good idea, in my opinion, but it should be directly VCL/FMX ready, not especially platform binded.
-
A user friendly way of showing location permissions settings on Android
Rollo62 replied to Dave Nottage's topic in General Help
Yes, I meanwhile put such "prominent disclosure" dialog in front of all my apps ( even if Windows ) 🙂 No matter if iOS don't require this, I think that is a good policy too. Regarding the permissions I do it similar as in some websites, saying we have "required" permissions, and explaining why they were required. Also explaining some privacy stuff there. If the user don't agree's, he should leave the app. But of course the user still can choose other settings in the OS dialog, than he did in the "prominent disclosure". The whole permission stuff is a permanent pain ....