zeus
zeus

Reputation: 12955

Why does using SkBlendMode::kClear produce a black box instead of clearing the area in Skia?

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.

Upvotes: 0

Views: 18

Answers (0)

Related Questions