void GraphicsContext::fillRoundedRect(const RoundedRect& rect, const Color& color, ColorSpace colorSpace) { if (rect.isRounded()) fillRoundedRect(rect.rect(), rect.radii().topLeft(), rect.radii().topRight(), rect.radii().bottomLeft(), rect.radii().bottomRight(), color, colorSpace); else fillRect(rect.rect(), color, colorSpace); }
void GraphicsContext::fillRoundedRect(const RoundedRect& rect, const Color& color, ColorSpace colorSpace, BlendMode blendMode) { if (rect.isRounded()) { setCompositeOperation(compositeOperation(), blendMode); fillRoundedRect(rect.rect(), rect.radii().topLeft(), rect.radii().topRight(), rect.radii().bottomLeft(), rect.radii().bottomRight(), color, colorSpace); setCompositeOperation(compositeOperation()); } else fillRect(rect.rect(), color, colorSpace, compositeOperation(), blendMode); }
void GraphicsContext::clipOutRoundedRect(const RoundedRect& rect) { if (paintingDisabled()) return; if (!rect.isRounded()) { clipOut(rect.rect()); return; } Path path; path.addRoundedRect(rect); clipOut(path); }