Plan 9 from Bell Labs’s /usr/web/sources/plan9/sys/src/libmemdraw/alpha.hoc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


func f(x) {
	return x-x%1
}

func pixel(dr, dg, db, da, sr, sg, sb, sa, m) {
	M = 255-f((sa*m)/255)
	print f((sr*m+dr*M)/255), " ", f((sg*m+dg*M)/255), " ", f((sb*m+db*M)/255),  " ", f((sa*m+da*M)/255), "\n"
	return 0
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].