2010-04-15 106 views
0

我想修改苹果的GLPaint样本来绘制一条实线,而不是像它那样的透明霓虹灯线。我正在尝试实现触摸喷漆功能,使其看起来像喷漆效果。我试图禁用glblend,但没有效果。并且我正在尝试使OpenGL在背景图像上绘制而不是默认的黑色。或者是否有可能让Open GL在具有透明背景的UIImageView上绘制?iPhone OpenGL绘制一条实线?

回答

1

在paintingView.h你会发现:

#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 

改变这些参数,可以让你实现实线。 上面的设置假设给你一条细实线。

希望它会有所帮助。 shani