08.11.2012 Views

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

This functionality is only available in the Pro Edition of <strong>Game</strong> <strong>Maker</strong>.<br />

Above, a number of basic drawing functions have been described. Here you find a number of<br />

additional functions that offer you a lot more possibilities. First of all there are functions to<br />

draw shapes <strong>with</strong> gradient colors. Secondly there are functions to draw more general<br />

polygons, and finally there is the possibility to draw texture mapped polygons.<br />

The following extended versions of the basic drawing functions exist. each of them gets extra<br />

color parameters that are used the determine the color at different vertices. The standard<br />

drawing color is not used in these functions.<br />

draw_point_color(x,y,col1) Draws a point at (x,y) in the given color.<br />

draw_line_color(x1,y1,x2,y2,col1,col2) Draws a line from (x1,y1)<br />

to (x2,y2), interpolating the color between col1 and col2.<br />

draw_line_width_color(x1,y1,x2,y2,w,col1,col2) Draws a line from<br />

(x1,y1) to (x2,y2) <strong>with</strong> width w interpolating the color between col1 and col2.<br />

draw_rectangle_color(x1,y1,x2,y2,col1,col2,col3,col4,outlin<br />

e) Draws a rectangle. The four colors indicated the colors at the top-left, top-<br />

right, bottom-right, and bottom-left vertex. outline indicates whether only the<br />

outline must be drawn (true) or it should be filled (false).<br />

draw_roundrect_color(x1,y1,x2,y2,col1,col2,outline) Draws a<br />

rounded rectangle. col1 is the color in the middle and col2 the color at the<br />

boundary. outline indicates whether only the outline must be drawn (true) or it<br />

should be filled (false).<br />

draw_triangle_color(x1,y1,x2,y2,x3,y3,col1,col2,col3,outlin<br />

e) Draws a triangle. The three colors are the colors of the three vertices which<br />

is interpolated over the triangle. outline indicates whether only the outline<br />

must be drawn (true) or it should be filled (false).<br />

draw_circle_color(x,y,r,col1,col2,outline) Draws a circle at (x,y)<br />

<strong>with</strong> radius r. col1 is the color in the middle and col2 the color at the<br />

boundary. outline indicates whether only the outline must be drawn (true) or it<br />

should be filled (false).<br />

draw_ellipse_color(x1,y1,x2,y2,col1,col2,outline) Draws an<br />

ellipse. col1 is the color in the middle and col2 the color at the boundary.<br />

outline indicates whether only the outline must be drawn (true) or it should be<br />

filled (false).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!