Class MarkerUtils
- java.lang.Object
-
- org.insa.graphs.gui.drawing.overlays.MarkerUtils
-
public class MarkerUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static int[][]
MASK_CACHE
private static int
MAX_X_CENTER
private static int
MAX_Y_CENTER
private static int
MAXIMUM_INNER_MASK_VALUE
private static int
MIN_X_CENTER
private static int
MIN_Y_CENTER
private static int
MINIMUM_INNER_MASK_VALUE
-
Constructor Summary
Constructors Constructor Description MarkerUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.Image
getMarkerForColor(java.awt.Color outer, java.awt.Color inner, Drawing.AlphaMode mode)
Create an image to represent a marker using the given color for the outer and inner part, and the given mode for the inner part.private static int[][]
readMarkerMask()
-
-
-
Field Detail
-
MASK_CACHE
private static int[][] MASK_CACHE
-
MIN_X_CENTER
private static final int MIN_X_CENTER
- See Also:
- Constant Field Values
-
MAX_X_CENTER
private static final int MAX_X_CENTER
- See Also:
- Constant Field Values
-
MIN_Y_CENTER
private static final int MIN_Y_CENTER
- See Also:
- Constant Field Values
-
MAX_Y_CENTER
private static final int MAX_Y_CENTER
- See Also:
- Constant Field Values
-
MINIMUM_INNER_MASK_VALUE
private static final int MINIMUM_INNER_MASK_VALUE
- See Also:
- Constant Field Values
-
MAXIMUM_INNER_MASK_VALUE
private static final int MAXIMUM_INNER_MASK_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMarkerForColor
public static java.awt.Image getMarkerForColor(java.awt.Color outer, java.awt.Color inner, Drawing.AlphaMode mode)
Create an image to represent a marker using the given color for the outer and inner part, and the given mode for the inner part.- Parameters:
outer
- Outer color of the marker.inner
- Inner color of the marker.mode
- Mode to use to fill the inner part of the marker.- Returns:
- An image representing a marker.
-
readMarkerMask
private static int[][] readMarkerMask()
- Returns:
- Retrieve the mask from the mask file or from the cache.
-
-