Plot
Syntax
Parameters
- x: the x component of the position on screen to draw a pixel at.
- y: the y component of the position on screen to draw a pixel at.
Example
#include "Leadwerks.h"
using namespace Leadwerks;
int main(int argc, const char *argv[])
{
Leadwerks::Window* window = Leadwerks::Window::Create();
Context* context = Context::Create(window);
while (true)
{
Context* context = Context::GetCurrent();
Leadwerks::Window* window = context->GetWindow();
if (window->Closed() || window->KeyDown(Key::Escape)) return false;
context->SetColor(0.0,0.0,1.0);
context->Clear();
context->SetColor(1.0,1.0,1.0);
//Draw some points on screen
context->Plot(1, 1);
context->Plot(1, 3);
context->Plot(1, 5);
context->Plot(3, 1);
context->Plot(3, 3);
context->Plot(3, 5);
context->Plot(5, 1);
context->Plot(5, 3);
context->Plot(5, 5);
context->Sync();
}
return 0;
}