mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Display image compression ratio in bits per pixel.
This commit is contained in:
parent
42ccf332b9
commit
0776dddc35
@ -13045,9 +13045,17 @@ void View::DrawPlayback()
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
char buf[64];
|
||||
auto ptr = PrintFloat( buf, buf+62, 100.f * fi->csz / ( size_t( fi->w ) * size_t( fi->h ) / 2 ), 2 );
|
||||
memcpy( ptr, "%", 2 );
|
||||
auto ptr = PrintFloat( buf, buf+62, 4.f * fi->csz / ( size_t( fi->w ) * size_t( fi->h ) / 2 ), 2 );
|
||||
memcpy( ptr, " bpp", 5 );
|
||||
TextFocused( "Ratio:", buf );
|
||||
if( ImGui::IsItemHovered() )
|
||||
{
|
||||
ImGui::BeginTooltip();
|
||||
ptr = PrintFloat( buf, buf+62, 100.f * fi->csz / ( size_t( fi->w ) * size_t( fi->h ) / 2 ), 2 );
|
||||
memcpy( ptr, "%", 2 );
|
||||
ImGui::TextUnformatted( buf );
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user