Option Strict On
Option Explicit On

Imports System
Imports System.Globalization
Imports System.Windows.Forms
Imports Nexamas.UI.Architecture
Imports Nexamas.UI.Controls
Imports Nexamas.UI.General
Imports Nexamas.UI.Layout
Imports Nexamas.UI.Rendering
Imports Nexamas.UI.Theming
Imports Nexamas.UI.TextRendering
Imports Nexamas.UI.Composition
Imports Nexamas.UI.Values
Imports SkiaSharp

Namespace Nexamas.UI.Components

    Partial Friend NotInheritable Class MASDatePickerCalendarView

#Region "Geometry Helpers"

        Private Sub ClearDayTargets()
            For i As Integer = 0 To _lastDayCells.Length - 1
                _lastDayCells(i) = SKRect.Empty
                _lastDayDates(i) = DateTime.MinValue
            Next
        End Sub

        Private Sub ClearSelectorTargets()
            For i As Integer = 0 To _lastMonthCells.Length - 1
                _lastMonthCells(i) = SKRect.Empty
                _lastMonthValues(i) = 0
            Next

            For i As Integer = 0 To _lastYearCells.Length - 1
                _lastYearCells(i) = SKRect.Empty
                _lastYearValues(i) = 0
            Next
        End Sub

        Private Shared Function Inset(rect As SKRect, amount As Single) As SKRect
            Return PixelSnap.SnapRectHalf(New SKRect(rect.Left + amount, rect.Top + amount, rect.Right - amount, rect.Bottom - amount))
        End Function

#End Region

    End Class

End Namespace
