Skip to content

Instantly share code, notes, and snippets.

@Hunachi
Created July 20, 2017 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hunachi/923534d1795fca90a11ea129e877310c to your computer and use it in GitHub Desktop.
Save Hunachi/923534d1795fca90a11ea129e877310c to your computer and use it in GitHub Desktop.
void Main()
{
Image image(Window::Size(), Palette::White);
DynamicTexture texture(image);
while (System::Update())
{
if (Input::MouseL.pressed)
{
Line(Mouse::PreviousPos(), Mouse::Pos()).overwrite(image, 8, Palette::Orange);
texture.fill(image);
}
if (Input::MouseR.clicked) {
Circle(Mouse::Pos(), 10).overwrite(image, Palette::Red);
texture.fill(image);
}
texture.draw();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment