光沢
https://scrapbox.io/files/64d633e6ea46ba001ce7a886.png
code:光沢.cpp
# include <Siv3D.hpp>
void polish(const RectF& rect, const ColorF& color, double f = 0.7) {
const ColorF glossColor = color.lerp(Palette::White, f);
rect.draw({ color,glossColor, color,glossColor });
}
void Main()
{
while (System::Update())
{
polish(Rect{ Arg::center(100,300),100 }, Palette::Gold);
polish(Rect{ Arg::center(300,300),100 }, Palette::Gray);
polish(Rect{ Arg::center(500,300),100 }, Palette::Saddlebrown);
polish(Rect{ Arg::center(700,300),100 }, Palette::Lightskyblue);
}
}