|
rigImGui 0.1.1
RigKit pack API - rigImGui
|
#include <imgui.h>Enumerations | |
| enum class | rigkit::RulerUnit |
| Display unit for host / Viewport rulers (persisted as UiPrefs.rulerUnit). | |
Functions | |
| float | rigkit::rulerPixPerDisplayUnit (RulerUnit unit, float contentZoomAbs, float dpiScale) |
| Screen pixels per display unit for content that is measured in pixels. | |
| float | rigkit::rulerPixPerWorldCm (RulerUnit unit, float pixelsPerWorldCm, float dpiScale) |
| Screen pixels per display unit when 1 world unit is 1 cm (CAD / 3D). | |
| float | rigkit::rulerPixPerContentUnit (RulerUnit display, float zoomAbs, const char *contentUnit, float dpiScale=1.f) |
| Screen pixels per display unit when content is page / world units. | |
| bool | rigkit::rulerHitStrip (ImVec2 origin, ImVec2 size, ImVec2 mouse, float uiScale=1.f) |
| True if mouse is over the top or left ruler strip (corner counts as both). | |
| void | rigkit::drawRulersInRegion (ImDrawList *dl, ImVec2 origin, ImVec2 size, ImVec2 mouse, float pixPerUnit, const char *unitLabel, float uiScale=1.f, ImVec2 contentOrigin=ImVec2(0, 0), bool flipY=false) |
| Draw top/left ruler strips over a screen region. | |
| bool | rigkit::rulerUnitPopup (const char *popupId, int &rulerUnit) |
| Right-click unit picker popup (call every frame; OpenPopup when strip hit). | |
| void rigkit::drawRulersInRegion | ( | ImDrawList * | dl, |
| ImVec2 | origin, | ||
| ImVec2 | size, | ||
| ImVec2 | mouse, | ||
| float | pixPerUnit, | ||
| const char * | unitLabel, | ||
| float | uiScale = 1.f, | ||
| ImVec2 | contentOrigin = ImVec2(0, 0), | ||
| bool | flipY = false ) |
Draw top/left ruler strips over a screen region.
| pixPerUnit | Screen pixels per display unit. |
| contentOrigin | Screen position of content (0,0) so ticks track pan/zoom. |
| flipY | Label the vertical strip y-up (font units, CAD) instead of screen-down. |
| float rigkit::rulerPixPerContentUnit | ( | RulerUnit | display, |
| float | zoomAbs, | ||
| const char * | contentUnit, | ||
| float | dpiScale = 1.f ) |
Screen pixels per display unit when content is page / world units.
| zoomAbs | View2D::zoomAbs (screen pixels per content unit). |
| contentUnit | "in", "mm", "cm", or "px". |
| float rigkit::rulerPixPerDisplayUnit | ( | RulerUnit | unit, |
| float | contentZoomAbs, | ||
| float | dpiScale ) |
Screen pixels per display unit for content that is measured in pixels.
| contentZoomAbs | View2D::zoomAbs (1 = identity screen mapping). |
| dpiScale | Window content scale (HiDPI); used with 96 CSS PPI. |
| float rigkit::rulerPixPerWorldCm | ( | RulerUnit | unit, |
| float | pixelsPerWorldCm, | ||
| float | dpiScale ) |
Screen pixels per display unit when 1 world unit is 1 cm (CAD / 3D).
| pixelsPerWorldCm | How many view pixels a 1 cm world offset covers at the focus. |
Px falls back to identity screen pixels. pixelsPerWorldCm <= 0 uses the paper mapping (rulerPixPerDisplayUnit at zoom 1).
| bool rigkit::rulerUnitPopup | ( | const char * | popupId, |
| int & | rulerUnit ) |
Right-click unit picker popup (call every frame; OpenPopup when strip hit).