• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker (SOLVED) draw_rectangle draws semi transparent pixels on fill and some other things

S

Shadowblitz16

Guest
does anybody know why draw_rectangle(0,7,127,7,false) is drawing a semi transparent rectangle?
upload_2018-12-24_15-54-0.png

also it seems that the lines top, left, and right lines are not drawing even though 0-7 is 8 pixels and
0-127 is 128 pixels which it should be drawing inside the rectangle like this..
upload_2018-12-24_15-53-14.png

here is my code
Code:
/// @description Create event of obj_game

depth = 1000;

global.font = font_add_sprite_ext(spr_font, " !\"#$%'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", true, 0)
global.save = ds_map_create();
global.palette =
[
    make_color_rgb(000, 000, 000), 
    make_color_rgb(032, 051, 123), 
    make_color_rgb(126, 037, 083), 
    make_color_rgb(000, 131, 049),
    make_color_rgb(171, 082, 054), 
    make_color_rgb(069, 069, 069), 
    make_color_rgb(194, 195, 199), 
    make_color_rgb(255, 241, 232),
    make_color_rgb(255, 000, 077), 
    make_color_rgb(255, 163, 000), 
    make_color_rgb(255, 231, 039), 
    make_color_rgb(000, 226, 050),
    make_color_rgb(041, 173, 255), 
    make_color_rgb(131, 118, 156), 
    make_color_rgb(255, 119, 168), 
    make_color_rgb(255, 204, 170)
]

game_set_speed(30, gamespeed_fps)
Code:
/// @description Draw end event of obj_game


draw_set_alpha(1);
draw_set_color(global.palette[7])
draw_rectangle(0, 7, 127, 7, true)

draw_set_color(global.palette[2])
draw_rectangle(0, 7, 127, 7, false)
Code:
/// @description Room change event of obj_game


surface_resize(application_surface, room_width, room_height)
 

FrostyCat

Redemption Seeker
Why is your rectangle's starting and ending y coordinates the same? That doesn't give a rectangle, that gives a line.
 
S

Shadowblitz16

Guest
I feel stupid now that i didn't see that.
thank you for pointing this out.

I will mark it as solved since it now draw like in the image i posted.
 
Top