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

Author Topic: Trying to draw a circle and the color won't change from white.  (Read 3923 times)

0 Members and 1 Guest are viewing this topic.

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
 ???

Here's the code that created the shape.

CircleShape mapcircle2 = new CircleShape(550);
mapcircle2.Position = new Vector2f(0,0);
mapcircle2.OutlineColor = new Color(0,255,0);
mapcircle2.Origin = new Vector2f(mapcircle2.Radius,mapcircle2.Radius);
 

For some reason the fill color is drawing and not the outline color so I don't know what's going on. ???
I have many ideas but need the help of others to find way to make use of them.

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Trying to draw a circle and the color won't change from white.
« Reply #1 on: April 12, 2014, 11:16:47 pm »
You need to also set outline thickness for outline to show up.
Back to C++ gamedev with SFML in May 2023

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: Trying to draw a circle and the color won't change from white.
« Reply #2 on: April 12, 2014, 11:26:14 pm »
??? don't see how I didn't see that sooner. XD

Meantime unless I intentionally set the fill color A value to 0 it still draws it. ???  Annoying but easily dealt with.
I have many ideas but need the help of others to find way to make use of them.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Trying to draw a circle and the color won't change from white.
« Reply #3 on: April 13, 2014, 01:27:59 am »
Meantime unless I intentionally set the fill color A value to 0 it still draws it. ???  Annoying but easily dealt with.

Ummmm.... what do you mean by this? Of course the circle is going to draw if you tell the window to draw it.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: Trying to draw a circle and the color won't change from white.
« Reply #4 on: April 13, 2014, 01:30:01 am »
Meantime unless I intentionally set the fill color A value to 0 it still draws it. ???  Annoying but easily dealt with.

Ummmm.... what do you mean by this? Of course the circle is going to draw if you tell the window to draw it.

Meant it still draws the fillcolor unless the A value of said color is 0. >.>
I have many ideas but need the help of others to find way to make use of them.

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
...
« Reply #5 on: April 13, 2014, 01:50:53 am »
The filling is always drawn. Unless it's transparent of course.
The outline is drawn if its size is > 0 and its color isn't transparent.

What's the problem with that?
« Last Edit: April 13, 2014, 01:52:51 am by G. »

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: Trying to draw a circle and the color won't change from white.
« Reply #6 on: April 13, 2014, 04:27:16 pm »
Not to mention, if the default color was transparent instead of white, then every time a newbie wrote code to draw a circle he'd see nothing and come tell us SFML is broken.

 

anything