diff options
author | 2017-11-21 14:59:31 -0500 | |
---|---|---|
committer | 2017-11-21 20:23:11 +0000 | |
commit | 07b56b2f38b976ecf4c4f52c14973651d39ad63a (patch) | |
tree | 6b264e9e817516ff23742b6a2c72da9e931ab8f3 /tools/viewer | |
parent | bff5a98cdfda84a94a1f592c638a809daaba2924 (diff) |
Add XY to zoom window
Bug: skia:7332
Change-Id: I3a7d5cf20c75bb288d5aa0fa9046e77a669aad64
Reviewed-on: https://skia-review.googlesource.com/74560
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tools/viewer')
-rw-r--r-- | tools/viewer/Viewer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp index 919fac00cf..0839161784 100644 --- a/tools/viewer/Viewer.cpp +++ b/tools/viewer/Viewer.cpp @@ -1343,7 +1343,9 @@ void Viewer::drawImGui(SkCanvas* canvas) { SkImageInfo info = SkImageInfo::MakeN32Premul(1, 1); if (fLastImage->readPixels(info, &pixel, info.minRowBytes(), mousePos.x, mousePos.y)) { ImGui::SameLine(); - ImGui::Text("RGBA: %x %x %x %x", SkGetPackedR32(pixel), SkGetPackedG32(pixel), + ImGui::Text("(X, Y): %d, %d RGBA: %x %x %x %x", + sk_float_round2int(mousePos.x), sk_float_round2int(mousePos.y), + SkGetPackedR32(pixel), SkGetPackedG32(pixel), SkGetPackedB32(pixel), SkGetPackedA32(pixel)); } |