Skip to content

moving immvision.image_display label_id to the right side of the image #300

Answered by pthom
angecide asked this question in Q&A
Discussion options

You must be logged in to vote

The way the label is displayed is not configurable.
However, you may use a hidden label:

immvision.image_display("##test img", img, (500, 428))

This way the label and the surrounding frame are hidden, and then you can render a label + frame yourself in whichever way you like.

For example:

    immvision.image_display("##test img", img, (500, 428))

     # Ugly manual rendering. Up to you to improve on it
    p0 = imgui.get_item_rect_min()
    p1 = imgui.get_item_rect_max()
    margin = 0.5
    p0 = p0 - hello_imgui.em_to_vec2(margin, margin)
    p1 = p1 + hello_imgui.em_to_vec2(margin, margin)
    color = imgui.color_convert_float4_to_u32((0.5, 0.5, 0.5, 1.0))
    imgui.get_window_draw_list(…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by angecide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants