mobomo / sketch.js

A jQuery plugin for dead simple Canvas-based drawing.
http://intridea.github.com/sketch.js
290 stars 110 forks source link

Alpha (opacity) is applying for previous strokes #26

Open srinu4122 opened 9 years ago

srinu4122 commented 9 years ago

Hello everyone, I'm facing an issue with sketch.js, that is when applying an alpha value (opacity) to color, it works fine for the first stroke but when i'm drawing second stroke, the alpha value of the previous stroke is increasing.

*For every new stroke the opacity of all previous strokes are increasing. Please help me out.

Lewiscowles1986 commented 9 years ago

is alpha increasing, or are you noticing that when 30% of colour x is applied to 30% colour x it makes 60% opacity (thats how it works, it's not a bug if this is the complaint and would require modifcation to work your way by clearing the area to 0% opacity, then drawing in the required opacity). If I have misunderstood please feel free to ignore

srinu4122 commented 9 years ago

I want to draw a stroke with some opacity consistently. will you please explain how to modify that functionality. thanks.

Lewiscowles1986 commented 9 years ago

srinu I just did you need to firstly write / wipe area to transparent, then apply your colour, this will stop opacity building up and keep it constant, but it is a change request not an issue...