SFML community forums
Bindings - other languages => DotNet => Topic started by: Dolfik on November 11, 2013, 03:54:54 pm
-
I'm trying to draw a shape, but nothing is displayed on the screen. The circle is drawn normally.
Code:
public static void ShapeDraw
(RenderWindow window
)//(float x, float y, float width, float height, RenderWindow window) { SShape shape
= new SShape
(); shape
.Origin = new Vector2f
(40,
40); shape
.Position = new Vector2f
(5,
5); shape
.FillColor = new SFML
.Graphics.Color(255,
0,
0); window
.Draw(shape
); }
SShape
class SShape
: SFML
.Graphics.Shape { //protected Shape(); //public Shape(SFML.Graphics.Shape copy); public override Vector2f GetPoint
(uint index
) { return new Vector2f
(); } public override uint GetPointCount
() { return (uint)0; } }
-
class SShape
: SFML
.Graphics.Shape { //protected Shape(); //public Shape(SFML.Graphics.Shape copy); public override Vector2f GetPoint
(uint index
) { return new Vector2f
(); } public override uint GetPointCount
() { return (uint)0; } }
Well if your custom shape has 0 points what do you expect to see? Maybe add at minimum 1 point and see if you get something.
-
Ok, thx just i thought it works differently.
-
It might be a good idea to look at the source for some of the classes that inherit from shape. You can use them as examples for how to properly implement things.