mbien commented on code in PR #8114:
URL: https://github.com/apache/netbeans/pull/8114#discussion_r1917422619
##########
platform/openide.util.ui/src/org/openide/util/ImageUtilities.java:
##########
@@ -316,8 +416,34 @@ public static final Image mergeImages(Image image1, Image
image2, int x, int y)
compositeCache.put(k, new ActiveRef<CompositeImageKey>(cached,
compositeCache, k));
return cached;
}
- }
-
+ }
+
+ /** This method merges two icons into a new one. The second icon is drawn
+ * over the first one with its top-left corner at x, y. Icons need not be
of the same size.
+ * The new icon will have a size of max(second icon size + top-left
corner, first icon size).
+ * This method used mostly when second icon contains transparent pixels
(e.g. for badging).
+ *
+ * <p>Similar to {@link #mergeImages(Image, Image, int, int)}, but on
{@link Icon} instances
+ * rather than {@link Image} instances. This method is provided as a
shortcut to avoid the need
+ * for conversions in client code.
+ *
+ * @param icon1 underlying icon
+ * @param icon2 second icon
+ * @param x x position of top-left corner
+ * @param y y position of top-left corner
+ * @return new merged icon
+ * @since 7.36
+ */
+ public static final Icon mergeIcons(Icon icon1, Icon icon2, int x, int y) {
Review Comment:
this would be `mergeIcons2Images2Icon` (I am kidding, please don't change :))
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists