bool GraphicsContext::setupShadowPaint(SkPaint* paint, SkPoint* offset) { if (paintingDisabled()) return false; syncPlatformContext(this); return platformContext()->setupPaintShadow(paint, offset); }
void GraphicsContext::setupFillPaint(SkPaint* paint) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->setupPaintFill(paint); }
void GraphicsContext::setupStrokePaint(SkPaint* paint) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->setupPaintStroke(paint, 0); }
void GraphicsContext::fillPath(const Path& pathToFill) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->fillPath(pathToFill, fillRule()); }
void GraphicsContext::strokeRect(const FloatRect& rect, float lineWidth) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->strokeRect(rect, lineWidth); }
void GraphicsContext::clearRect(const FloatRect& rect) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->clearRect(rect); }
void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int width, int offset, const Color& color) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->drawFocusRing(rects, width, offset, color); }
// This is only used to draw borders. void GraphicsContext::drawLine(const IntPoint& point1, const IntPoint& point2) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->drawLine(point1, point2); }
void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorSpace colorSpace) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->fillRect(rect, color, colorSpace); }
void GraphicsContext::strokeArc(const IntRect& r, int startAngle, int angleSpan) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->strokeArc(r, startAngle, angleSpan); }
// This method is only used to draw the little circles used in lists. void GraphicsContext::drawEllipse(const IntRect& rect) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->drawEllipse(rect); }
void GraphicsContext::drawLineForText(const FloatPoint& pt, float width, bool /* printing */) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->drawLineForText(pt, width); }
void GraphicsContext::strokePath(const Path& pathToStroke) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->strokePath(pathToStroke); }
void GraphicsContext::drawConvexPolygon(size_t numPoints, const FloatPoint* points, bool shouldAntialias) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->drawConvexPolygon(numPoints, points, shouldAntialias); }
void GraphicsContext::drawLineForTextChecking(const FloatPoint& pt, float width, TextCheckingLineStyle style) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->drawLineForTextChecking(pt, width, style); }
void GraphicsContext::fillRoundedRect(const IntRect& rect, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, const Color& color, ColorSpace colorSpace) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->fillRoundedRect(rect, topLeft, topRight, bottomLeft, bottomRight, color, colorSpace); }
void GraphicsContext::drawHighlightForText(const Font& font, const TextRun& run, const FloatPoint& point, int h, const Color& backgroundColor, ColorSpace colorSpace, int from, int to, bool isActive) { if (paintingDisabled()) return; syncPlatformContext(this); platformContext()->drawHighlightForText(font, run, point, h, backgroundColor, colorSpace, from, to, isActive); }
void GraphicsContext::clearRect(const FloatRect& rect) { if (paintingDisabled()) return; FloatRect recordingRect(0, 0, platformContext()->getCanvas()->getDevice()->width(), platformContext()->getCanvas()->getDevice()->height()); if (rect == recordingRect && !platformContext()->isAnimating()) { m_animationTimeCounter->tick(); // We are making an assumption that if the entire canvas is being // cleared at a certain frame rate, it is because we are animating. if (platformContext()->isDefault() && m_animationTimeCounter->isAnimating()) platformContext()->setIsAnimating(); } syncPlatformContext(this); platformContext()->clearRect(rect); }