LoginLogin

K2KPaint

Root / Submissions / [.]

cookieCreated:
Download:DD53V3C4
Version:Size:
K2KPaint is paint tool.

I know this from before. Miiverse i guess. Awesome tool

I love this! It's very obvious that a lot of work has been put into this It's a really powerful tool!

How did you manage opacity? Or rather, color blending?

The drawings she made are amazing, and all on this tool.

I wonder if this could be merged with this http://smilebasicsource.com/page?pid=550

Replying to:MZ952
How did you manage opacity? Or rather, color blending?
Color blending is pretty simple, using linear interpolation, or "lerp" for short. If you want 80% of one color and 20% of another, for each individual RGB component, you'd simply do the following:
R=0.8*R0 + 0.2*R1
For alpha blending, where 0% alpha should make it the first color and 100% alpha should make it the second color, the formula becomes:
R=(1-A)*R0 + A*R1
And to extend that to alpha having a range of 0 to 255, rather than 0% to 100%:
R=(1-A/255)*R0 + A/255*R1
You can see this used in my own anti-aliased line library.

Replying to:MZ952
I wonder if this could be merged with this http://smilebasicsource.com/page?pid=550
I'm considering restarting the DEFY Paint project now, with the DEFY 2.0 project.

Replying to:MZ952
I wonder if this could be merged with this http://smilebasicsource.com/page?pid=550
Seems like a nice update. That would be useful :D