private void drawForeground(final ZonedDateTime TIME) {
        foregroundCtx.clearRect(0, 0, size, size);

        Locale locale = clock.getLocale();

        // draw the time
        if (clock.isTextVisible()) {
            foregroundCtx.setFill(textColor);
            foregroundCtx.setTextBaseline(VPos.CENTER);
            foregroundCtx.setTextAlign(TextAlignment.CENTER);
            if (Locale.US == locale) {
                foregroundCtx.setFont(Fonts.digital(0.17 * size));
                foregroundCtx.fillText(AMPM_TIME_FORMATTER.format(TIME), center, center);
            } else {
                foregroundCtx.setFont(Fonts.digital(0.2 * size));
                foregroundCtx.fillText(TIME_FORMATTER.format(TIME), center, center);
            }
        }

        // draw the date
        if (clock.isDateVisible()) {
            foregroundCtx.setFill(dateColor);
            foregroundCtx.setFont(Fonts.digital(0.09 * size));
            foregroundCtx.fillText(dateFormat.format(TIME), center, size * 0.65);
        }

        // draw the alarmOn icon
        if (clock.isAlarmsEnabled() && clock.getAlarms().size() > 0) {
            foregroundCtx.setFill(alarmColor);
            drawAlarmIcon(foregroundCtx, foregroundCtx.getFill());
        }
    }
private void drawForeground ( final ZonedDateTime TIME ) { foregroundCtx . clearRect ( 0 , 0 , size , size ) ; Locale locale = clock . getLocale ( ) ; if ( clock . isTextVisible ( ) ) { foregroundCtx . setFill ( textColor ) ; foregroundCtx . setTextBaseline ( VPos . CENTER ) ; foregroundCtx . setTextAlign ( TextAlignment . CENTER ) ; if ( Locale . US == locale ) { foregroundCtx . setFont ( Fonts . digital ( 0.17 * size ) ) ; foregroundCtx . fillText ( AMPM_TIME_FORMATTER . format ( TIME ) , center , center ) ; } else { foregroundCtx . setFont ( Fonts . digital ( 0.2 * size ) ) ; foregroundCtx . fillText ( TIME_FORMATTER . format ( TIME ) , center , center ) ; } } if ( clock . isDateVisible ( ) ) { foregroundCtx . setFill ( dateColor ) ; foregroundCtx . setFont ( Fonts . digital ( 0.09 * size ) ) ; foregroundCtx . fillText ( dateFormat . format ( TIME ) , center , size * 0.65 ) ; } if ( clock . isAlarmsEnabled ( ) && clock . getAlarms ( ) . size ( ) > 0 ) { foregroundCtx . setFill ( alarmColor ) ; drawAlarmIcon ( foregroundCtx , foregroundCtx . getFill ( ) ) ; } }
******************** Canvas ********************************************