sexta-feira, 3 de janeiro de 2020

Starting with GFX

Hello, MiniScripters! Today i will tell a bit about GFX (Graphics Effects), and how to draw squares and ellipses. You need to know how to deal with this if you want to earn the Pixel Neophyte and the Pixel Master MiniScript Badges. You can see how to draw a shape by typing "help "graphics"" at MiniMicro. But now let's start.

With MiniMicro

Step 1


Type:

gfx.clear color.white

Step 2 


Type:
gfx.color = color.black


Step 3


Type:
gfx.fillEllipse 350, 200 , 200, 200


Step 4


Type:
gfx.fillEllipse 310, 360, 100, 100



Step 5


Type:
gfx.fillEllipse 490, 360, 100, 100



Step 6


Save and run.


Your program must look like this:

Yeah, it's Mickey Mouse's head.



Explaining

"gfx.clear color.white"

It must to erase all the gfx effects on the screen and set the screen color to white.

"gfx.color = color.black"

This command defines the color of the graphical effects. In this case, it set the gfx color to black; soo, if we draw a square or a circle with the gfx command, it's color will be black.

"gfx.fillEllipse 350, 200 , 200, 200"

This command draws a ellipse, with the following parameters: gfx.fillEllipse left, bottom, width, height.

So, this was the post today, i hope you like it! If you have any questions, you can ask it here, at the MiniScript forums or at discord.