Documentation
¶
Overview ¶
Package calendar draws a one-month calendar grid into a pixel buffer. It is used for the popup shown while the pointer hovers the clock module.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Draw ¶
func Draw(pix []byte, w, h, stride, scale, radius int32, faces *render.FaceSet, now time.Time, col Colors)
Draw paints the calendar for now's month onto the physical pixel buffer (BGRA8888, stride = w*4). The current day is highlighted. radius (logical pixels) rounds the corners; 0 keeps the square box.
Types ¶
type Colors ¶
type Colors struct {
Bg color.RGBA // panel background
Fg color.RGBA // weekday numbers and the month header
Muted color.RGBA // weekday letter row
Border color.RGBA // frame + separator line
Today color.RGBA // highlight behind today's number
TodayFg color.RGBA // today's number, drawn on the highlight
Weekend color.RGBA // Saturday/Sunday numbers
}
Colors are the palette the calendar paints with; the caller derives these from the bar theme.
Click to show internal directories.
Click to hide internal directories.