Skip to content

Commit

Permalink
make fully opaque alpha bitmask to be a static field
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Pisarev committed Jan 31, 2019
1 parent d9be16d commit 872a8ca
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public class TransformAwareBufferedImageOverlayRendererFX

private static Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());

private static final int FULL_OPACITY = 0xff << 24;

protected AffineTransform3D pendingTransform;

protected AffineTransform3D paintedTransform;
Expand Down Expand Up @@ -115,7 +117,7 @@ public void drawOverlays(final Consumer<Image> g)
* https://docs.oracle.com/javase/8/javafx/api/javafx/scene/effect/BlendMode.html
*/
for (final ARGBType px : sourceImage.asArrayImg())
px.set(px.get() | (0xff << 24));
px.set(px.get() | FULL_OPACITY);

sourceImage.setPixelsDirty();
g.accept(sourceImage);
Expand Down

0 comments on commit 872a8ca

Please sign in to comment.