This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
users:shilo:extensions:shblendmodes [2012/03/12 06:57] – shilo | users:shilo:extensions:shblendmodes [2013/03/05 10:19] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== SHBlendModes ====== | ||
+ | ---- dataentry extension ---- | ||
+ | type : extension | ||
+ | author_mail | ||
+ | description | ||
+ | lastupdate_dt : 2012-03-11 | ||
+ | compatible | ||
+ | depends | ||
+ | tags : blend, blending, mode, blend mode | ||
+ | homepage_url | ||
+ | download_url | ||
+ | ---- | ||
+ | ===== Properties ===== | ||
+ | === blendMode === | ||
+ | An integer that specifies a preset blend mode. The initial value is SHBlendModeAuto. | ||
+ | < | ||
+ | See [[shblendmodes# | ||
+ | |||
+ | === blendModeName === | ||
+ | A readonly string that describes what blending mode is in use. The initial value is " | ||
+ | < | ||
+ | |||
+ | === blendModeSourceFactor === | ||
+ | An integer that specifies how the red, green, blue, and alpha source blending factors are computed. The following symbolic constants are accepted: GL_ZERO, GL_ONE, GL_DST_COLOR, | ||
+ | < | ||
+ | Changing this property will automatically set " | ||
+ | |||
+ | === blendModeDestinationFactor === | ||
+ | An integer that specifies how the red, green, blue, and alpha destination blending factors are computed. Eight symbolic constants are accepted: GL_ZERO, GL_ONE, GL_SRC_COLOR, | ||
+ | < | ||
+ | Changing this property will automatically set " | ||
+ | |||
+ | ===== Instance Methods ===== | ||
+ | === setBlendModeSourceFactor: | ||
+ | Sets the blend mode source factor and destination source factor. See [[shblendmodes# | ||
+ | < | ||
+ | Calling this method will automatically set " | ||
+ | |||
+ | ===== Presets ===== | ||
+ | * **SHBlendModeAuto** - Blend mode will automatically be handled by Sparrow. (Default) | ||
+ | * **SHBlendModeNormal** - The source and destination alpha value will blend normally. | ||
+ | * **SHBlendModeInverseMask** - The source alpha will be 100% and the destination alpha value will be 0%. This preset is only useful for drawing an object into a SPRenderTexture. | ||
+ | * **SHBlendModeErase** - Erases the pixels behind the object' | ||
+ | * **SHBlendModeCustom** - Allows you to specify the blend source factor and blend destination factor manually. | ||
+ | * More presets to come... | ||
+ | |||
+ | ===== Source Code ===== | ||
+ | %gist(2019733)% |