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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

e drawn using the draw_text() function. Can be used for precisely<br />

positioning graphics.<br />

string_height(string) Height of the string in the current font as it would<br />

be drawn using the draw_text() function.<br />

string_width_ext(string,sep,w) Width of the string in the current font<br />

as it would be drawn using the draw_text_ext() function. Can be used for<br />

precisely positioning graphics.<br />

string_height_ext(string,sep,w) Height of the string in the current<br />

font as it would be drawn using the draw_text_ext() function.<br />

The following routines allow you to draw scaled and rotated text and also to use gradient<br />

colors on texts. These functions are only available in the Pro Edition!<br />

draw_text_transformed(x,y,string,xscale,yscale,angle) Draws<br />

the string at position (x,y) in the same way as above, but scale it horizontally<br />

and vertically <strong>with</strong> the indicated factors and rotate it counter-clockwise over<br />

angle degrees.<br />

draw_text_ext_transformed(x,y,string,sep,w,xscale,yscale,an<br />

gle) Combines the function draw_text_ext and<br />

draw_text_transformed. It makes it possible to draw a multi-line text<br />

rotated and scaled.<br />

draw_text_color(x,y,string,c1,c2,c3,c4,alpha) Draws the string<br />

at position (x,y) like above. The four colors specify the colors of the top-left,<br />

top-right, bottom-right, and bottom-left corner of the text. alpha is the alpha<br />

transparency to be used (0-1).<br />

draw_text_ext_color(x,y,string,sep,w,c1,c2,c3,c4,alpha)<br />

Similar to draw_text_ext() but <strong>with</strong> colored vertices.<br />

draw_text_transformed_color(x,y,string,xscale,yscale,angle,<br />

c1,c2,c3,c4,alpha) Similar to draw_text_transformed() but <strong>with</strong><br />

colored vertices.<br />

draw_text_ext_transformed_color(x,y,string,sep,w,xscale,ysc<br />

ale,angle,c1,c2,c3,c4,alpha) Similar to<br />

draw_text_ext_transformed() but <strong>with</strong> colored vertices.<br />

Advanced drawing functions

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

Saved successfully!

Ooh no, something went wrong!