1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-17 01:04:19 +00:00

Merge branch 'master' into docking

# Conflicts:
#	docs/CHANGELOG.txt
This commit is contained in:
ocornut 2023-01-21 00:49:06 +01:00
commit 88dfd85e92
10 changed files with 162 additions and 148 deletions

View file

@ -102,6 +102,19 @@ Other changes:
VERSION 1.89.3 (In Progress)
-----------------------------------------------------------------------
All changes:
- Tables: Raised max Columns count from 64 to 512. (#6094, #5305, #4876, #3572)
The previous limit was due to using 64-bit integers but we moved to bits-array
and tweaked the system enough to ensure no performance loss.
- Text: Fixed layouting of wrapped-text block skipping successive empty lines,
regression from the fix in 1.89.2. (#5720, #5919)
- Text: Fix clipping of single-character "..." ellipsis (U+2026 or U+0085) when font
is scaled. Scaling wasn't taken into account, leading to ellipsis character straying
slightly out of its expected boundaries. (#2775)
- Text: Tweaked rendering of three-dots "..." ellipsis variant. (#2775, #4269)
- PlotHistogram, PlotLines: Passing negative sizes honor alignment like other widgets.
Docking+Viewports Branch:
- Backends: GLFW: Handle unsupported glfwGetVideoMode() for Emscripten. (#6096)
@ -113,7 +126,7 @@ Docking+Viewports Branch:
Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.89.2
Other changes:
All changes:
- Tables, Nav, Scrolling: fixed scrolling functions and focus tracking with frozen rows and
frozen columns. Windows now have a better understanding of outer/inner decoration sizes,

View file

@ -178,8 +178,21 @@ Rectangles provided by Dear ImGui are defined as
`(x1=left,y1=top,x2=right,y2=bottom)`
and **NOT** as
`(x1,y1,width,height)`.
Refer to rendering backends in the [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder for references of how to handle the `ClipRect` field.
Refer to rendering backends in the [backends/](https://github.com/ocornut/imgui/tree/master/backends) folder for references of how to handle the `ClipRect` field.
For example, the [DirectX11 backend](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_dx11.cpp) does this:
```cpp
// Project scissor/clipping rectangles into framebuffer space
ImVec2 clip_off = draw_data->DisplayPos;
ImVec2 clip_min(pcmd->ClipRect.x - clip_off.x, pcmd->ClipRect.y - clip_off.y);
ImVec2 clip_max(pcmd->ClipRect.z - clip_off.x, pcmd->ClipRect.w - clip_off.y);
if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
continue;
// Apply scissor/clipping rectangle
const D3D11_RECT r = { (LONG)clip_min.x, (LONG)clip_min.y, (LONG)clip_max.x, (LONG)clip_max.y };
ctx->RSSetScissorRects(1, &r);
```
##### [Return to Index](#index)
---