cinder drawing in wrong place

im using the cinder library and im trying to be able to create points with titles in certain places but there showing up top left instead of in the middle like they should

#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
#include "cinder/Shape2d.h"


using namespace ci;
using namespace ci::app;
using namespace std;
using namespace gl;

int width = 400;
int height = 400;

class data_point {
float x = 0;
float y = 0;
public:
void values(float a, float b) {
if (a >= 0) {
x = ((a / 10)*width);
}
if (b >= 0) {
y = ((b / 10)*height);
}
}

void draw() {
drawString("liv", vec2(x-5, y-15), ColorA(255, 255, 255, 255), Font());
drawSolidCircle(vec2(x, y), 2);
}


};




class CinderProjectApp : public App {
public:
void setup() override;
void mouseDown( MouseEvent event ) override;
void update() override;
void draw() override;
};


void CinderProjectApp::setup()
{
setWindowSize(width, height);
setFrameRate(60.0f);

}

void CinderProjectApp::mouseDown( MouseEvent event )
{
}

void CinderProjectApp::update()
{
}

void CinderProjectApp::draw()
{
clear( Color( 0, 0, 0 ) );
data_point liv;
liv.values(5, 5);
liv.draw();
}



CINDER_APP( CinderProjectApp, RendererGl )
i've solved my problem i had to many parentheses i made a simple mistake
Topic archived. No new replies allowed.