mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Add optional 2x zoom to frame images playback.
This commit is contained in:
parent
1c0c5f5282
commit
5da2076214
@ -9241,6 +9241,19 @@ void View::DrawPlayback()
|
||||
}
|
||||
|
||||
ImGui::Begin( "Playback", &m_showPlayback, ImGuiWindowFlags_AlwaysAutoResize );
|
||||
if( m_playback.zoom )
|
||||
{
|
||||
if( fi->flip )
|
||||
{
|
||||
ImGui::Image( m_playback.texture, ImVec2( fi->w * 2, fi->h * 2 ), ImVec2( 0, 1 ), ImVec2( 1, 0 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::Image( m_playback.texture, ImVec2( fi->w * 2, fi->h * 2 ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( fi->flip )
|
||||
{
|
||||
ImGui::Image( m_playback.texture, ImVec2( fi->w, fi->h ), ImVec2( 0, 1 ), ImVec2( 1, 0 ) );
|
||||
@ -9249,6 +9262,7 @@ void View::DrawPlayback()
|
||||
{
|
||||
ImGui::Image( m_playback.texture, ImVec2( fi->w, fi->h ) );
|
||||
}
|
||||
}
|
||||
int tmp = m_playback.frame + 1;
|
||||
if( ImGui::SliderInt( "Frame image", &tmp, 1, ficnt, "%d" ) )
|
||||
{
|
||||
@ -9315,6 +9329,8 @@ void View::DrawPlayback()
|
||||
m_zvEnd = m_worker.GetFrameEnd( *frameSet, fi->frameRef );
|
||||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox( "Zoom 2x", &m_playback.zoom );
|
||||
TextFocused( "Timestamp:", TimeToString( tstart - m_worker.GetTimeBegin() ) );
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
@ -534,6 +534,7 @@ private:
|
||||
uint32_t currFrame = -1;
|
||||
bool pause = true;
|
||||
bool sync = false;
|
||||
bool zoom = false;
|
||||
} m_playback;
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user