Flaick
Member
Hi guys, i'm trying to optimize my code in draw events. I've start to use surfaces. But i have a strange issue, the text will appear bad when drawing onto surface. But if i copy from applicaiton_surface is perfect. So i presume there is some setting into application_surface that i have to propagate to my custom surface. Here the code:
Create:
Draw:
And here the screen:
Create:
Code:
txt = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris gravida nunc sed justo malesuada molestie.";
surf = -1;
Code:
if !surface_exists(surf){
surf = surface_create(surface_get_width(application_surface),surface_get_height(application_surface));
//Uncomment this it works!
//surface_copy(surf,0,0,application_surface);
surface_set_target(surf);
draw_set_font(-1);
draw_text_ext(10,10,txt,12,400);
surface_reset_target();
}
//Text on surface
draw_surface(surf,0,0);
//Original text
draw_text_ext(10,400,txt,12,400);