admin管理员组

文章数量:1180493

I'm trying to erase a rectangle on an SkCanvas by setting the paint's blend mode to kClear. However, instead of getting a transparent area, I end up with a solid black rectangle. Here's a minimal snippet:

paint.setBlendMode(SkBlendMode::kClear);
canvas->drawRect(rect, paint);

I expected the rectangle to become fully transparent, but I'm seeing black where I cleared.

  • Why does this produce black instead of a transparent hole?
  • How can I make the rectangle truly transparent?

本文标签: