| 3923 | } |
| 3924 | |
| 3925 | rdcpair<int32_t, int32_t> TextureViewer::GetPickedLocation() |
| 3926 | { |
| 3927 | TextureDescription *texptr = GetCurrentTexture(); |
| 3928 | |
| 3929 | if(texptr) |
| 3930 | { |
| 3931 | QPoint p = m_PickedPoint; |
| 3932 | |
| 3933 | p.setX(MipCoordFromBase(p.x(), texptr->width)); |
| 3934 | p.setY(MipCoordFromBase(p.y(), texptr->height)); |
| 3935 | |
| 3936 | uint32_t mipHeight = qMax(1U, texptr->height >> (int)m_TexDisplay.subresource.mip); |
| 3937 | |
| 3938 | if(ShouldFlipForGL()) |
| 3939 | p.setY((int)(mipHeight - 1) - p.y()); |
| 3940 | if(m_TexDisplay.flipY) |
| 3941 | p.setY((int)(mipHeight - 1) - p.y()); |
| 3942 | |
| 3943 | return {p.x(), p.y()}; |
| 3944 | } |
| 3945 | |
| 3946 | return {-1, -1}; |
| 3947 | } |
| 3948 | |
| 3949 | void TextureViewer::ShowGotoPopup() |
| 3950 | { |
nothing calls this directly
no test coverage detected