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 - TTF_drawLine_Blended() overload a colour parameter
Summary: TTF_drawLine_Blended() overload a colour parameter
Status: RESOLVED FIXED
Alias: None
Product: SDL_ttf
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-03 07:14 UTC by Sylvain
Modified: 2018-11-06 14:34 UTC (History)
0 users

See Also:


Attachments
patch (2.12 KB, patch)
2018-11-03 22:17 UTC, Sylvain
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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