+ return color.getRGB();
+ }
+
+ private BufferedImage applyMask(BufferedImage mask, BufferedImage image)
+ {
+ Graphics2D g = (Graphics2D) image.getGraphics();
+ g.setComposite(
+ AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f));
+ g.drawImage(mask, 0, 0, image.getWidth(), image.getHeight(), null);
+ return image;
+ }
+
+ /*
+ * Build a masking image of hidden columns and rows to be applied on top
+ * of the main overview image.
+ */
+ private BufferedImage buildHiddenImage(AlignmentRowsCollectionI rows,
+ AlignmentColsCollectionI cols, int width, int height)
+ {
+ // new masking image
+ BufferedImage hiddenImage = new BufferedImage(width, height,
+ BufferedImage.TYPE_INT_ARGB);
+
+ int colIndex = 0;
+ int pixelCol = 0;
+
+ Color hidden = Color.DARK_GRAY;
+
+ Graphics2D g2d = (Graphics2D) hiddenImage.getGraphics();
+
+ // set background to transparent
+ g2d.setComposite(AlphaComposite.Clear);
+ g2d.fillRect(0, 0, width, height);
+
+ // set next colour to opaque
+ g2d.setComposite(AlphaComposite.Src);
+
+ for (int alignmentCol : cols)