2010-04-15 69 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