Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Naxos

Pages: [1]
1
Graphics / [Solved] sf::Shape::Line not drawing a line
« on: September 17, 2009, 09:35:29 pm »
Thanks Nexus :)

I should've noticed that myself, geez.

For the moment I'm just saying:

Code: [Select]
App.Draw( sf::Shape::Line( p.x, p.y, n.x, n.y, 10.0f, sf::Color(127,127,127,127) ) );

And that works. I suppose a container would be more efficient time-wise, but I'll leave it like this unless it starts to affect performance.

Thanks again!

2
Graphics / [Solved] sf::Shape::Line not drawing a line
« on: September 17, 2009, 08:41:28 pm »
I'm trying to draw some simple lines using the Line() function of sf::Shape.

However, I get no rendering of lines on the screen.

Here's how I'm doing it at the moment:

Code: [Select]

sf::Shape line;
for(unsigned int i=0;i<layout.size();++i)
{
// get 1st point for line
LayoutPoint p = layout.getPointAt(i);

sprDiamond.SetPosition( p.x, p.y );
App.Draw( sprDiamond );  // this draws no problem

// get 2nd point for line ( % size() because the lines are drawing a 'track' of sorts )
LayoutPoint n = layout.getPointAt( (i+1) % layout.size() );

line.Line( p.x, p.y, n.x, n.y, 10.0f, sf::Color(127,127,127,127) );
App.Draw( line );
}


So I get my positions drawing diamonds, but the lines between each diamond are not being draw.

Am I doing something incorrectly here?

Pages: [1]