Is there a foolproof method of getting different Object2D elements in the correct position on a page that are then placed in a Group2D? Currently I have to guess (hoping that the Object2D element even ends up on the Canvas) and then through trial and error get it where I want it to be on the “page”. Also, I find that when I get it right on a Mac, I have to go through the process again for a Windows app. Is there an easy way out of that too? Currently I just store the Method used on Windows, and replace my Mac version with it, because I do all my developing on a Mac.
Can you show some examples where the positions aren’t what you’d expect?
Something to be aware of is that once you add something to a Group2D then transforming the group transforms it’s children. But if you transformed the group before adding something then that thing stays where it is. Another complication is an object2d can be added to multiple groups and each group will modify the object. That’s very confusing and shouldn’t be done if you are.
This is the first I’ve heard of a platform difference. Can you show the different Mac/Windows code for the same drawing?
Hi Will
Thanks for the reply. I am hoping that I will be able to share my two screenshots with you. Currently they are in Dropbox.
Before I do, I should say, that I do my developing on the Mac (as I stated previously), then I copy the Xojo Project to Windows 10 and run it there with the same version of Xojo.
My Windows 10 is running in a Parallels virtual disk, although probably this coming week I am going to purchase a PC to be able to avoid this.
The links (I hope):
I had a quick look at them - I have no idea why they are such a different size.
Do you specify the font and size for your text? Or just use the defaults? That appears to be the difference from a cursory look at your screenshots.
Hi Tim
Just went and looked. Every time I put in a StringShape I do specify both the font and the size. Because this app is destined for Windows I have chosen Arial (which I understand is pretty much a default). But I have checked and Arial and Arial Black (the two fonts I use) are available on both my Mac and PC.
Yes, the Font on Windows looks bigger.
Could this be the issue; Windows text scaling?
I seem to recall a discussion about how each platform tweaks their own fonts, so Arial on Mac isn’t exactly the same as on Windows. (Or maybe I’m just too tired).
I’d compare screen captures of a TextArea and Graphics.DrawString with the same font settings on both systems and see if those have any difference.
Quite true. And to make matter even worse, the very same exact font on each system won’t render identically, as the font imagers on each platform have their own way. As you refer to vector graphics, OpenType (TT or PostScript) fonts are made of Bézier curves, that the system imager interpret into pixels for display or for print. With the very low resolution of screen, even at 144 dpi, a tiny 12 points size character looks like a checkerboard. Designing curves to make sure which pixel will end up left or right is not quite simple.
Quite a few years ago I got paid to produce a font with the requirement that rendition should be absolutely identical on Mac and Windows, since the developer of a program did not feel like addressing the issue. I succeeded in delivering , but it took all my know how to make it happen.
Thanks for the replies. I guess it could be the problem that Norman was speaking of in the above link. However, before I can check that I am going to have to find where Text Scaling is in Windows 10. Oh dear. Why does Microsoft feel that the idea of text scaling should be a matter for the Control Panel?
On Windows 10 it is already set to 100%, so I guess that is not the problem. Tomorrow I am going to buy a PC and transfer my Xojo licence to it. I have had a few other small problems by developing on the Mac and then trying to move the Project to a PC (albeit in a Parallels partition). I will see what happens if I do everything on the PC.
I used VirtualBox and so I also had troubles until Normal told me to use a shared folder. Then, these troubles disappears.
I do not know if Parallels have such question.
HTH.
It is important to note that in Windows 10, there is no separate font scaling as it existed in Windows 7. Scaling in effect acts like a non Retina program on a Retina screen : one pixel represents several.
For all intents and purposes, it is the same as lowering screen resolution. The issue being that pixels become kind of blurry.
Microsoft recommends 100% scaling.