RuiwenTang / Skity

A light weight 2D Vector Graphic renderer library writing in c++ for OpenGL3.3+ / OpenGLES3.0+ / Vulkan 1.1+/ WebGL2 with WASM
https://ruiwentang.github.io/Skity/
MIT License
219 stars 28 forks source link

setMaskFilter( ) 导致图形不绘制 #29

Closed 0TemetNosce0 closed 2 years ago

0TemetNosce0 commented 2 years ago
 skity::Paint paint;

 paint.setMaskFilter(skity::MaskFilter::MakeBlur(skity::BlurStyle::kNormal, 10.f));
RuiwenTang commented 2 years ago

@0TemetNosce0 Paint 上没有设置颜色或 gradient么?

0TemetNosce0 commented 2 years ago
  skity::Paint paint;
  paint.setStyle(skity::Paint::kFill_Style);
  paint.setMaskFilter(skity::MaskFilter::MakeBlur(skity::BlurStyle::kNormal, 10.f));
  paint.setFillColor(150.f / 255.f, 150.f / 255.f, 1.f, 1.f);
  canvas->drawCircle(300, 100, 50, paint);

注释setMaskFilter绘制正常

RuiwenTang commented 2 years ago

@0TemetNosce0 我在本地试了一下,是可以绘制出来的,能贴一下更完整的代码么,比如OpenGL的上下文创建