Click here to Skip to main content
15,887,267 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerAsked and answered 2 weeks ago Pin
led mike8-Apr-09 4:23
led mike8-Apr-09 4:23 
QuestionTripleDES ECB in Visual C++ Pin
annese8-Apr-09 2:55
annese8-Apr-09 2:55 
AnswerRe: TripleDES ECB in Visual C++ Pin
Chris Losinger8-Apr-09 6:34
professionalChris Losinger8-Apr-09 6:34 
Questionborder of the childframe Pin
prithaa8-Apr-09 2:36
prithaa8-Apr-09 2:36 
AnswerRe: border of the childframe Pin
Code-o-mat8-Apr-09 2:52
Code-o-mat8-Apr-09 2:52 
GeneralRe: border of the childframe Pin
prithaa8-Apr-09 3:09
prithaa8-Apr-09 3:09 
QuestionHelp with how to add/mix RGBA values Pin
spiffen8-Apr-09 1:17
spiffen8-Apr-09 1:17 
AnswerRe: Help with how to add/mix RGBA values Pin
Iain Clarke, Warrior Programmer8-Apr-09 1:24
Iain Clarke, Warrior Programmer8-Apr-09 1:24 
Assuming 0 = no colour, 1 = lots of it, and 0=see through, and 1=opaque...

I'd say something like this:
newRed = ( baseAlpha * baseRed + paintAlpha * paintRed ) / (baseAlpha + paintAlpha);
newGreen = ...
newBlue = ...
newAlpha = 1 - (1-baseAlpha)*(1-paintAlpha);

I didn't add in a check whether both paintAlpha and baseAlpha were 0. In which case, newAlpha is also 0, and the end colour is "undefined". Or irrelevant!

I'll leave the challenge of converting my 0.0-1.0 sums to 0-255 to you!

Iain.

In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!

GeneralRe: Help with how to add/mix RGBA values Pin
spiffen8-Apr-09 2:22
spiffen8-Apr-09 2:22 
GeneralRe: Help with how to add/mix RGBA values Pin
Iain Clarke, Warrior Programmer8-Apr-09 2:32
Iain Clarke, Warrior Programmer8-Apr-09 2:32 
GeneralRe: Help with how to add/mix RGBA values Pin
spiffen8-Apr-09 4:16
spiffen8-Apr-09 4:16 
GeneralRe: Help with how to add/mix RGBA values Pin
Iain Clarke, Warrior Programmer8-Apr-09 6:00
Iain Clarke, Warrior Programmer8-Apr-09 6:00 
GeneralRe: Help with how to add/mix RGBA values Pin
Iain Clarke, Warrior Programmer8-Apr-09 2:34
Iain Clarke, Warrior Programmer8-Apr-09 2:34 
GeneralRe: Help with how to add/mix RGBA values Pin
CPallini8-Apr-09 7:19
mveCPallini8-Apr-09 7:19 
QuestionHow to convert LZW type tiff file to PDF c++? Pin
raesa8-Apr-09 0:58
raesa8-Apr-09 0:58 
AnswerRe: How to convert LZW type tiff file to PDF c++? Pin
Rajesh R Subramanian8-Apr-09 1:07
professionalRajesh R Subramanian8-Apr-09 1:07 
AnswerRe: How to convert LZW type tiff file to PDF c++? Pin
Jijo.Raj8-Apr-09 1:13
Jijo.Raj8-Apr-09 1:13 
GeneralRe: How to convert LZW type tiff file to PDF c++? Pin
raesa8-Apr-09 1:38
raesa8-Apr-09 1:38 
GeneralRe: How to convert LZW type tiff file to PDF c++? Pin
Rajesh R Subramanian8-Apr-09 2:02
professionalRajesh R Subramanian8-Apr-09 2:02 
GeneralRe: How to convert LZW type tiff file to PDF c++? Pin
Stuart Dootson8-Apr-09 2:40
professionalStuart Dootson8-Apr-09 2:40 
GeneralRe: How to convert LZW type tiff file to PDF c++? Pin
raesa8-Apr-09 17:40
raesa8-Apr-09 17:40 
QuestionRapi use for connect with active sync,now what can i use for connect with Mobile Device Center? Pin
Le@rner8-Apr-09 0:54
Le@rner8-Apr-09 0:54 
QuestionDouble to CString Pin
Davitor7-Apr-09 23:57
Davitor7-Apr-09 23:57 
AnswerRe: Double to CString Pin
«_Superman_»7-Apr-09 23:59
professional«_Superman_»7-Apr-09 23:59 
QuestionQuery related to DllInstall() Pin
narayanagvs7-Apr-09 23:36
narayanagvs7-Apr-09 23:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.