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 - Jukeyy

Pages: [1]
1
Graphics / Re: Colorful square with recent version of SFML
« on: August 13, 2019, 07:59:26 am »
Okay nevermind! The solution is on this page -> https://www.sfml-dev.org/tutorials/2.5/graphics-vertex-array.php

:)

2
Graphics / Colorful square with recent version of SFML
« on: August 13, 2019, 05:54:58 am »
I found this old piece of code on a french website:

    // Fenêtre de rendu

    RenderWindow app(VideoMode(600, 600, 32), "Mon superbe polygone SFML !");


    Shape carre;

    carre.AddPoint(200, 200, Color(255, 255, 0), Color(255,255,255));

    carre.AddPoint(400, 200, Color(255, 255, 0), Color(255,0,0));

    carre.AddPoint(400, 400, Color(0, 255, 255), Color(0,255,0));

    carre.AddPoint(200, 400, Color(0, 255, 255), Color(0,0,255));

    carre.EnableFill(true); // Remplissage activé

    carre.EnableOutline(true); // Bordures activées

    carre.SetOutlineWidth(20); // Bordures de taille 20 pixels

This picture is the result one should acheive -> https://user.oc-static.com/files/254001_255000/254040.jpg

All the member functions in the code seems to be outdated.. What class or function should I use to get an equivalent result as shown in the picture link?
I've tried ConvexShape.. worked fine to build a simple shape but couldn't get that cool colorful shape.

Thank you

Pages: [1]