开发者

iPhone OpenGL to draw a solid line?

I am trying to modify the GLPaint sample from apple to draw a solid line instead of the tra开发者_StackOverflownsparent neon like line in it. I am trying to achieve the touch paint function to look something like a spray paint effect. I tried disabled the glblend but no effect. And also I am trying to make OpenGL to draw on a background image instead of the default black color. Or is it possible to make Open GL to draw on a UIImageView with transparent background ?


in the paintingView.h you will find:

#define kBrushOpacity   1.0 //the opacity of the line
#define kBrushPixelStep 1 // the density the dots
#define kBrushScale     14 //thickens  of the line (1 = thickest)
#define kLuminosity     0.5 // the Luminosity. I think that this is what you have to play with
#define kSaturation     1.0 //the Saturation of the line color

changing those parameters will allow you to achieve solid line. the settings above suppose to give you a thin solid line.

hope it will help. shani

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜