drawing function Oval blitzmax
BlitzMax Forums/BlitzMax Beginners Area/drawing function Oval blitzmax
| ||
Hello I have a project that needs to use the drawing functions using BlitzMax circle, for example, and here I have a problem because by calling the command: DrawOval x # y #, # width, height # I can't draw a circle???? Why? In blitzPlus using: Oval x, y, width, height [, solid] draw me a circle!!! Please reply Blicek |
| ||
Hello, in Blitzmax help section there is an DrawOval example: ' drawoval.bmx ' draws a pair of eyes using 4 DrawOval commands, 2 white, 2 blue ' positions the blue ovals so the eyes track the mouse Graphics 640,480 While Not KeyHit(KEY_ESCAPE) Cls SetColor 255,255,255 DrawOval 0,0,320,200 DrawOval 320,0,320,200 SetColor 0,0,255 x=(MouseX()-320)/10 y=(MouseY()-240)/10 DrawOval 220-32+x,100+y,64,64 DrawOval 420-32+x,100+y,64,64 Flip Wend -Henri |
| ||
Hi DrawOval draws a FILLED oval. you could use something like this That allows to draw a circle (or a polygon of N sides, just change STEPS parameter) There are other algorithm (faster than this one) The main advantage is that you can draw every single segment in different ways. |
| ||
Ok! Ok! Ok! I did not expect such a quick answer, the more that you formed a beautiful explanation by giving me the finished code (functions) and a general idea on this topic. Thanks A few words: In spite of everything, I am surprised that the creators of BlitzMaxa do not have this in the command as is the case in the rest of the Blitz Basic Blicek |