A
Adiabat
Guest
Hi all,
I'm trying to cut out a small part of an image that may consist of several separate sprites. For what I'm trying to do the part that has been cut out must appear identical to the original part. To do this I'm using surfaces. The problem is that the two parts do not appear identical - in the example below the circle created from the surface appears slightly different from the original (lines are a little thicker I think). Is there anything I can do about this?
Thanks as always!
Draw event:
I'm trying to cut out a small part of an image that may consist of several separate sprites. For what I'm trying to do the part that has been cut out must appear identical to the original part. To do this I'm using surfaces. The problem is that the two parts do not appear identical - in the example below the circle created from the surface appears slightly different from the original (lines are a little thicker I think). Is there anything I can do about this?
Thanks as always!
Draw event:
Code:
display_reset(8, false);
radius = 100;
// Draw a circle to the screen
draw_set_circle_precision(64);
draw_circle(300,300,radius,true);
// Draw additional circles of slightly different radii to make outline thicker
// draw_circle(300,300,radius-1,true);
// draw_circle(300,300,radius+1,true);
var surf;
surf = surface_create(700,700);
surface_set_target(surf);
// Draw a circle to the surface "surf"
draw_circle(300,300,radius,true);
// Draw additional circles of slightly different radii to make outline thicker
// draw_circle(300,300,radius-1,true);
// draw_circle(300,300,radius+1,true);
// Create custom sprite from surface - should be identical to original circle
spr_custom = sprite_create_from_surface(surf,300-radius,300-radius,2*(radius+5),2*(radius+5),
false,false,radius,radius);
surface_reset_target();
surface_free(surf);
// Draw custom sprite to screen for comparison with original circle
draw_sprite(spr_custom,0,510,300);