private void applyRectangleStyle(Rectangle r, Offset offset) {
   Color customColor = myInputApi.getHolidayColor(offset.getOffsetStart());
   if (customColor != null) {
     r.setBackgroundColor(customColor);
     r.setOpacity(1.0f);
   }
   if ((offset.getDayMask() & DayMask.HOLIDAY) == DayMask.HOLIDAY) {
     r.setStyle("calendar.holiday");
     return;
   }
   if ((offset.getDayMask() & DayMask.WEEKEND) == DayMask.WEEKEND) {
     r.setStyle("calendar.weekend");
     return;
   }
 }