Get Application Scale

Quick question, how do I get the value of this setting in my java awt program? Alternatively, how do I prevent this setting from affecting a java awt geom AffineTransform?
No description
17 Replies
JavaBot
JavaBot11mo ago
This post has been reserved for your question.
Hey @The Typhothanian! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
dan1st
dan1st11mo ago
I don't think it affects AffineTransform but possibly the thing you transform
The Typhothanian
The TyphothanianOP11mo ago
hmm. I'll check. It's a BufferedImage btw Doesn't look like theres a method to change that.
dan1st
dan1st11mo ago
well the system scale shouldn't affect BufferedImage itself but the thing you draw it on
The Typhothanian
The TyphothanianOP11mo ago
The Frame? is there a setting to disable that setting for the frame? lemme check
dan1st
dan1st11mo ago
idk how it's drawn
The Typhothanian
The TyphothanianOP11mo ago
doesnt seem like there's a method for that
dan1st
dan1st11mo ago
I don't think Java provides any methods to change it
dan1st
dan1st11mo ago
for Windows, it would be possible to make use of https://learn.microsoft.com/en-us/answers/questions/65033/command-line-for-scaling-in-windows-settings-for-d to read it but that wouldn't be reliable
Command line for scaling in windows settings for deployment - Micro...
i want to use a command line to adjust the scale in windows 10 trough a .bat file. and deploy these anyone has an idea? i already use a .bat file for power settings
thank you in advance
dan1st
dan1st11mo ago
generally, you should assume that there may be some scaling and don't know what build your system in a way that the scale doesn't matter Also using AWT directly for GUIs isn't really recommended
JavaBot
JavaBot11mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
The Typhothanian
The TyphothanianOP11mo ago
Yeah, I either need to get the value of the setting or prevent it from affecting my frame
dan1st
dan1st11mo ago
Why?
The Typhothanian
The TyphothanianOP11mo ago
The issue is that my Projection Marix projects pixels, and the AffineTransform is modified by this setting, so my game would look weird
dan1st
dan1st11mo ago
I claim you won't be able to reliably do it
The Typhothanian
The TyphothanianOP11mo ago
I want my face to by 16x16 and its 20x20 instead hmm Okay, is there a way that I can check if it's affecting my game, and then warn players that they should set it to 0? *100 Suppose I could make a BufferedImage that is 16x16 pixels, get the graphics, and attempt to draw another 16x16 pixel image to it, and if an error is thrown, the setting is > 100%? Would that work?
JavaBot
JavaBot11mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server