mirror of
https://github.com/ocornut/imgui.git
synced 2024-12-01 02:37:24 +01:00
Demo: custom rendering tweak.
This commit is contained in:
parent
0a11024459
commit
e7cc048d81
@ -1674,7 +1674,7 @@ static void ShowExampleAppCustomRendering(bool* opened)
|
|||||||
}
|
}
|
||||||
draw_list->PushClipRect(ImVec4(canvas_pos.x, canvas_pos.y, canvas_pos.x+canvas_size.x, canvas_pos.y+canvas_size.y)); // clip lines within the canvas (if we resize it, etc.)
|
draw_list->PushClipRect(ImVec4(canvas_pos.x, canvas_pos.y, canvas_pos.x+canvas_size.x, canvas_pos.y+canvas_size.y)); // clip lines within the canvas (if we resize it, etc.)
|
||||||
for (int i = 0; i < points.Size - 1; i += 2)
|
for (int i = 0; i < points.Size - 1; i += 2)
|
||||||
draw_list->AddLine(ImVec2(canvas_pos.x + points[i].x, canvas_pos.y + points[i].y), ImVec2(canvas_pos.x + points[i+1].x, canvas_pos.y + points[i+1].y), 0xFF00FFFF);
|
draw_list->AddLine(ImVec2(canvas_pos.x + points[i].x, canvas_pos.y + points[i].y), ImVec2(canvas_pos.x + points[i+1].x, canvas_pos.y + points[i+1].y), 0xFF00FFFF, 2.0f);
|
||||||
draw_list->PopClipRect();
|
draw_list->PopClipRect();
|
||||||
if (adding_preview)
|
if (adding_preview)
|
||||||
points.pop_back();
|
points.pop_back();
|
||||||
|
Loading…
Reference in New Issue
Block a user