mirror of
https://github.com/ocornut/imgui.git
synced 2026-10-29 07:54:40 +00:00
Anti-aliased border (change between 1.89.7 and 1.92.9b) #9577
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#9577
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version/Branch of Dear ImGui:
Version 1.92.9b Branch: docking
Back-ends:
imgui_impl_glfw.cpp + imgui_impl_wgpu.cpp
Compiler, OS:
macOS / clang 21
Full config/build information:
// (Copy from the next line. Keep the ``` markers for formatting.)
Details:
I have included a screenshot (very zoomed in) below to demonstrate the differences between 1.89.7 (right side) and 1.92.9b (left side).
The border around a button is generated with:
They looks very different. Before it was sharp and clean. Now it is very anti-aliased resulting in a much duller image when rendered at normal zoom. I did try to use
style.AntiAliasedLines = falsewhich results in the second screenshot uploaded and shows that there is a missing pixel in the corners.Also more subtle, but also contributing to the more duller look, is more anti-aliasing on the font itself. For example the "t" in the word "Front" has a lot more grey pixels now than it used to.
For the font, I know there was a big change in 1.92.0 and I have adapted my code (before, I was loading my font at a
fontScale * size, and then usingio.FontGlobalScale = 1.0f / fontScale. Now I just set style.FontSizeBase tosizeandio.ConfigDpiScaleFonts = true). That might explain the difference. That being said, the text was more readable before at normal zoom level.Screenshots/Video:
1.92.9b Left Side vs 1.89.7 right side
1.92.9b with
style.AntiAliasedLines = falseMinimal, Complete and Verifiable Example code:
This is the code I use to render the text radio buttons:
Note that you can also reproduce the border problem by going to Demo / Tools / Style Editor. Select the FrameBoder checkbox which adds the border to all widgets... then toggle the Rendering/Anti-Aliased line toggle on and off to see how much sharper/duller it looks. It is less pronounced because the border is not white. But if you change the Border color to white in the color editor, then this reproduce the problem without adding any code...