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?
17 Replies
⌛
This post has been reserved for your question.
Hey @The Typhothanian! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose 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.
I don't think it affects AffineTransform
but possibly the thing you transform
hmm. I'll check. It's a BufferedImage btw
Doesn't look like theres a method to change that.
well the system scale shouldn't affect BufferedImage itself but the thing you draw it on
The Frame?
is there a setting to disable that setting for the frame?
lemme check
idk how it's drawn
doesnt seem like there's a method for that
I don't think Java provides any methods to change it
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
thank you in advance
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
💤
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.
Yeah, I either need to get the value of the setting or prevent it from affecting my frame
Why?
The issue is that my Projection Marix projects pixels, and the AffineTransform is modified by this setting, so my game would look weird
I claim you won't be able to reliably do it
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?
💤
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.