MCPcopy Create free account
hub / github.com/ArtifexSoftware/mupdf / redraw

Method redraw

platform/java/example/Viewer.java:774–794  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

772 }
773
774 protected void redraw() {
775 boolean wasShrinkWrapped = isShrinkWrapped(pixmapWidth, pixmapHeight);
776
777 if (pixmap != null) {
778 pixmapWidth = pixmap.getWidth();
779 pixmapHeight = pixmap.getHeight();
780 BufferedImage image = new BufferedImage(pixmapWidth, pixmapHeight, BufferedImage.TYPE_3BYTE_BGR);
781 image.setRGB(0, 0, pixmapWidth, pixmapHeight, pixmap.getPixels(), 0, pixmapWidth);
782 pageCanvas.setPage(image, showLinks ? links : null, hits);
783 } else {
784 pixmapWidth = 0;
785 pixmapHeight = 0;
786 pageCanvas.setPage(null, null, null);
787 }
788
789 if (wasShrinkWrapped)
790 shrinkWrap();
791
792 pageCanvas.invalidate();
793 validate();
794 }
795
796 protected static String paperSizeName(int w, int h)
797 {

Callers 3

clearSearchMethod · 0.95
toggleLinksMethod · 0.95
onPageContentsChangeMethod · 0.95

Calls 6

isShrinkWrappedMethod · 0.95
shrinkWrapMethod · 0.95
setPageMethod · 0.80
getWidthMethod · 0.45
getHeightMethod · 0.45
getPixelsMethod · 0.45

Tested by

no test coverage detected