According to the BrazilianLaw on Industrial Property (Lei 9.279 de 14 de maio de 1996; See translation), Chapter IV, Article 191, Brazilian official symbols are Public Domain because they can be copied and reproduced without any permission from the Brazilian government or anyone else unless they are being copied or reproduced with foul intentions.
This image shows a flag, a coat of arms, a seal or some other official insignia. The use of such symbols is restricted in many countries. These restrictions are independent of the copyright status.
(Now that I finally got some time to look into it deeper, I saw what was wrong in the current version. Sorry for reverting your upload, Pumbaa80. This revision is just a cleanup on Pumbaa80's version (not much to clean, the code was already very good :)).)
(exact dimensions from http://pt.wikipedia.org/wiki/Bandeira_do_Brasil; positions and orientations of the stars estimated from the construction sheet given there)
(This was created by en:User:TigerTjäder, based on the website of the Brazilian Government. He has released this under the GFDL license. See http://en.wikipedia.org/wiki/Image:Brasil_Flag.svg)