We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4353

Summary: TTF_drawLine_Blended() overload a colour parameter
Product: SDL_ttf Reporter: Sylvain <sylvain.becker>
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: x86_64   
OS: Linux   
Attachments: patch

Description Sylvain 2018-11-03 07:14:38 UTC
Render_Blended function are calling TTF_drawLine_Blended() with a colour parameter:

  TTF_drawLine_Blended(..., pixel | (Uint32)fg.a << 24);

Which is overloaded in TTF_drawLine_Blended():

  Uint32 pixel = color | 0xFF000000; /* Amask */

  ( https://hg.libsdl.org/SDL_ttf/file/66fe96efd5f6/SDL_ttf.c#l153 )

Not sure which one should to be kept, or maybe this is an issue.
Comment 1 Sylvain 2018-11-03 22:17:25 UTC
Created attachment 3442 [details]
patch
Comment 2 Sylvain 2018-11-03 22:19:23 UTC
Here the patch for the opaque draw line blended
Comment 3 Sam Lantinga 2018-11-06 14:34:29 UTC
Yup, that looks right, thanks!
https://hg.libsdl.org/SDL_ttf/rev/7e4132e3d124