hedgewars/uRenderUtils.pas
changeset 12591 7bae1fab444b
parent 12102 51596d30a724
child 13489 8935dcc0e130
equal deleted inserted replaced
12590:b4b5484be651 12591:7bae1fab444b
   334         if checkFails(finalSurface <> nil, 'RenderString: fail to create surface', true) then
   334         if checkFails(finalSurface <> nil, 'RenderString: fail to create surface', true) then
   335             exit(nil);
   335             exit(nil);
   336 
   336 
   337         WriteInRoundRect(finalSurface, 0, 0, Color, font, s, maxLength);
   337         WriteInRoundRect(finalSurface, 0, 0, Color, font, s, maxLength);
   338 
   338 
   339         checkFails(SDL_SetColorKey(finalSurface, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, false);
   339         checkFails(SDL_SetColorKey(finalSurface, SDL_TRUE, 0) = 0, errmsgTransparentSet, false);
   340 
   340 
   341         RenderStringTexLim:= Surface2Tex(finalSurface, false);
   341         RenderStringTexLim:= Surface2Tex(finalSurface, false);
   342 
   342 
   343         SDL_FreeSurface(finalSurface);
   343         SDL_FreeSurface(finalSurface);
   344         end;
   344         end;