package main // The little smiley on the bar. Clicking it presses Win+. which opens the // Windows emoji panel (emoji, GIFs, symbols and the clipboard history), so // whatever you pick is pasted into the window you were just typing in. import "math" func drawEmojiIcon(hdc uintptr, r rect) { if !layerFg { return } cx, cy := center(r) col := iconColor() rad := float64(px(7.5)) // the face face := make([]point, 0, 33) for k := 0; k <= 32; k++ { a := float64(k) * 2 * math.Pi / 32 face = append(face, point{cx + int32(math.Round(rad*math.Cos(a))), cy + int32(math.Round(rad*math.Sin(a)))}) } polyline(hdc, face, px(1.3), col) // the eyes eye := px(1.1) circleRaw(hdc, cx-px(2.7), cy-px(2), eye, col) circleRaw(hdc, cx+px(2.7), cy-px(2), eye, col) // the smile smile := make([]point, 0, 9) sr := float64(px(4.2)) for k := 0; k <= 8; k++ { a := (25 + float64(k)*130/8) * math.Pi / 180 smile = append(smile, point{cx + int32(math.Round(sr*math.Cos(a))), cy + int32(math.Round(sr*math.Sin(a))) - px(0.5)}) } polyline(hdc, smile, px(1.2), col) }