Macroquad: How do I define a border?

In the Processing lang I am able to use stroke() to tell that future shapes will have a border around it.

I am using macroquad crate for my own project I am looking through the man pages but I am struggling to find if there is a way to draw borders around the 2D shape?

You can specify a border using the _lines methods, i.e: draw_rectangle_lines(), draw_poly_lines().etc..

If you come from Processing though, I'm not sure if macroquad allows for keeping screen state on each frame. At least I've found that It will always clear the screen on every frame. Other than that, If you're into creative coding, you might be interested on checking out nannou for stuff like that.

Ah I see.

In my other post it seems to be having some weird dots or something when I tried this, why is that happening though?

Sorry mate what do you mean by this?

In Processing, each time the draw() function gets invoked, the screen is not cleared. In macroquad, each time you call next_frame(), the screen is cleared, which is not often the desired behaviour when doing creative coding.

Regarding the dots effect you are experiencing, I guess it's due to the algorythm macroquad uses in order to generate borders, I don't know whow you would prevent that tbh.

I see, that kinda sucks. I will probably check out Nannou.

I see, thanks mate anyways :slight_smile:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.