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>
This commit is contained in:
parent
bff5a98cdf
commit
07b56b2f38
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user