java.lang.Object
io.github.stanio.xbrz.awt.XbrzImage
xBRZ scaled icons.
new ImageIcon(...)
→ XbrzImage.apply(new ImageIcon(...))
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImageIcon
Sets up the given icon with aMultiResolutionImage
deriving resolution variants by applying xBRZ to the icon's current image.static <M extends Image & MultiResolutionImage>
MCreates aMultiResolutionImage
deriving resolution variants by applying xBRZ to the given image.
-
Method Details
-
apply
Sets up the given icon with aMultiResolutionImage
deriving resolution variants by applying xBRZ to the icon's current image. Replaces the given icon's image with a multi-resolution one that uses the current icon's image to produce resolution variants as requested.- Parameters:
icon
- image icon to set up- Returns:
- The given
ImageIcon
with image updated to aMultiResolutionImage
deriving resolution variants by applying xBRZ to the icon's current image
-
mrImage
Creates aMultiResolutionImage
deriving resolution variants by applying xBRZ to the given image.- Type Parameters:
M
- anImage
subclass that implementsMultiResolutionImage
- Parameters:
image
- base image to derive resolution variants from- Returns:
- A
MultiResolutionImage
dynamically producing xBRZ variants - See Also:
-