Set the label font size with options. The options string can contain 'scale' (enlarge labels when image zoomed), 'bold' (display bold labels) or 'background' (display labels with contrasting background.
(int size, String options)
| 423 | * with contrasting background. |
| 424 | */ |
| 425 | public void setLabelFontSize(int size, String options) { |
| 426 | int style = Font.PLAIN; |
| 427 | if (options!=null) { |
| 428 | scalableLabels = options.contains("scale"); |
| 429 | if (options.contains("bold")) |
| 430 | style = Font.BOLD; |
| 431 | drawBackgrounds = options.contains("back"); |
| 432 | } |
| 433 | labelFont = new Font("SansSerif", style, size); |
| 434 | drawLabels(true); |
| 435 | } |
| 436 | |
| 437 | public Font getLabelFont() { |
| 438 | return labelFont; |
no test coverage detected