svoid g22_renderPosterizedHighlightedImage(ImageSurface isPosterized, Gazelle22_ImageToRegions itr, bool showRegionsAsOutline) { if (isPosterized == null) ret; var mouse = mouseLocationPt(); if (!isScreenCoordinateInWindow(mouse, isPosterized)) { var mouse2 = itr.coordinatesFromScreen(mouse); //printVars(+mouse, +mouse2); mouse = mouse2; } else mouse = isPosterized.mousePosition; var pixels = itr.posterized.getRGBPixels(); g22_highlightRegion(pixels, isPosterized, itr, mouse, showRegionsAsOutline); if (itr.scoredRegions != null) for (IImageRegion region, double score : itr.scoredRegions) { if (score >= .5) { int color = colorToIntOpaque(blendColors(lightBlue(), Color.blue, (score-.5)*2)); g22_highlightRegion(pixels, itr, region.indexInCreator(), color, false); } } isPosterized.setImage(bufferedImage(pixels, itr.posterized)); }