0

我是 cocos2D 的新手,我想画成

我尝试使用 CCSprite 并且也厌倦了使用它来解决它

[brush setBlendFunc:(ccBlendFunc){GL_ONE, GL_ONE_MINUS_SRC_ALPHA}]; [brush.texture setAliasTexParameters];

但我只有图像

其中边缘是钝的/模糊的。我怎样才能使模糊边缘的图像像第一个一样清晰?有人可以建议我正确的方法吗?

我用来生成上述图像的代码是

  brush = [CCSprite spriteWithFile:@"sketch.png"];
  [brush setColor:ccc3(0, 0, 0)];
  brush.scale = 1.5f;
  [brush setBlendFunc:(ccBlendFunc){GL_ONE, GL_ONE_MINUS_SRC_ALPHA}];
  [brush.texture setAliasTexParameters];

在手势法中,

  [brush setPosition:curntPoint];
  [brush setRotation:rand() % 360];
  [brush setOpacity:brushAlpha];

提前致谢。

4

0 回答 0