/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once namespace Data { struct UniqueGift; struct UniqueGiftBackdrop; } // namespace Data namespace Ui::Text { class CustomEmoji; } // namespace Ui::Text class PeerData; namespace Ui { struct PatternPoint { QPointF position; float64 scale = 1.; float64 opacity = 1.; }; [[nodiscard]] QImage CreateTopBgGradient( QSize size, const Data::UniqueGift &gift); [[nodiscard]] QImage CreateTopBgGradient( QSize size, const Data::UniqueGiftBackdrop &backdrop); [[nodiscard]] QImage CreateTopBgGradient( QSize size, QColor centerColor, QColor edgeColor, bool rounded = true, QPoint offset = QPoint()); [[nodiscard]] QImage CreateTopBgGradient( QSize size, not_null peer, QPoint offset = QPoint()); [[nodiscard]] const std::vector &PatternBgPoints(); [[nodiscard]] const std::vector &PatternBgPointsSmall(); void PaintBgPoints( QPainter &p, const std::vector &points, base::flat_map &cache, not_null emoji, const Data::UniqueGift &gift, const QRect &rect, float64 shown = 1.); void PaintBgPoints( QPainter &p, const std::vector &points, base::flat_map &cache, not_null emoji, const Data::UniqueGiftBackdrop &backdrop, const QRect &rect, float64 shown = 1.); void PaintBgPoints( QPainter &p, const std::vector &points, base::flat_map &cache, not_null emoji, const QColor &patternColor, const QRect &rect, float64 shown = 1.); } // namespace Ui