Home | History | Annotate | Download | only in graphics

Lines Matching refs:graphicsContext

34 #include "GraphicsContext.h"
309 void ShadowBlur::adjustBlurRadius(GraphicsContext* context)
342 IntRect ShadowBlur::calculateLayerBoundingRect(GraphicsContext* context, const FloatRect& shadowedRect, const IntRect& clipRect)
399 void ShadowBlur::drawShadowBuffer(GraphicsContext* graphicsContext)
404 graphicsContext->save();
410 graphicsContext->clip(FloatRect(m_layerOrigin, m_layerSize));
412 graphicsContext->clipToImageBuffer(m_layerImage, FloatRect(m_layerOrigin, bufferSize));
413 graphicsContext->setFillColor(m_color, m_colorSpace);
415 graphicsContext->clearShadow();
416 graphicsContext->fillRect(FloatRect(m_layerOrigin, m_sourceRect.size()));
418 graphicsContext->restore();
444 void ShadowBlur::drawRectShadow(GraphicsContext* graphicsContext, const FloatRect& shadowedRect, const RoundedIntRect::Radii& radii)
446 IntRect layerRect = calculateLayerBoundingRect(graphicsContext, shadowedRect, graphicsContext->clipBounds());
450 adjustBlurRadius(graphicsContext);
454 if (!graphicsContext->getCTM().isIdentityOrTranslationOrFlipped() || m_type != BlurShadow) {
455 drawRectShadowWithoutTiling(graphicsContext, shadowedRect, radii, layerRect);
463 drawRectShadowWithoutTiling(graphicsContext, shadowedRect, radii, layerRect);
467 drawRectShadowWithTiling(graphicsContext, shadowedRect, radii, templateSize);
470 void ShadowBlur::drawInsetShadow(GraphicsContext* graphicsContext, const FloatRect& rect, const FloatRect& holeRect, const RoundedIntRect::Radii& holeRadii)
472 IntRect layerRect = calculateLayerBoundingRect(graphicsContext, rect, graphicsContext->clipBounds());
476 adjustBlurRadius(graphicsContext);
480 if (!graphicsContext->getCTM().isIdentityOrTranslationOrFlipped() || m_type != BlurShadow) {
481 drawInsetShadowWithoutTiling(graphicsContext, rect, holeRect, holeRadii, layerRect);
489 drawInsetShadowWithoutTiling(graphicsContext, rect, holeRect, holeRadii, layerRect);
493 drawInsetShadowWithTiling(graphicsContext, rect, holeRect, holeRadii, templateSize);
496 void ShadowBlur::drawRectShadowWithoutTiling(GraphicsContext* graphicsContext, const FloatRect& shadowedRect, const RoundedIntRect::Radii& radii, const IntRect& layerRect)
505 GraphicsContext* shadowContext = m_layerImage->context();
527 drawShadowBuffer(graphicsContext);
532 void ShadowBlur::drawInsetShadowWithoutTiling(GraphicsContext* graphicsContext, const FloatRect& rect, const FloatRect& holeRect, const RoundedIntRect::Radii& holeRadii, const IntRect& layerRect)
545 GraphicsContext* shadowContext = m_layerImage->context();
570 drawShadowBuffer(graphicsContext);
607 void ShadowBlur::drawInsetShadowWithTiling(GraphicsContext* graphicsContext, const FloatRect& rect, const FloatRect& holeRect, const RoundedIntRect::Radii& radii, const IntSize& templateSize)
609 graphicsContext->save();
610 graphicsContext->clearShadow();
625 GraphicsContext* shadowContext = m_layerImage->context();
659 graphicsContext->save();
660 graphicsContext->setFillRule(RULE_EVENODD);
661 graphicsContext->setFillColor(m_color, m_colorSpace);
662 graphicsContext->fillPath(exteriorPath);
663 graphicsContext->restore();
665 drawLayerPieces(graphicsContext, destHoleBounds, radii, roundedRadius, templateSize, InnerShadow);
667 graphicsContext->restore();
673 void ShadowBlur::drawRectShadowWithTiling(GraphicsContext* graphicsContext, const FloatRect& shadowedRect, const RoundedIntRect::Radii& radii, const IntSize& templateSize)
675 graphicsContext->save();
676 graphicsContext->clearShadow();
689 GraphicsContext* shadowContext = m_layerImage->context();
712 drawLayerPieces(graphicsContext, shadowBounds, radii, roundedRadius, templateSize, OuterShadow);
714 graphicsContext->restore();
720 void ShadowBlur::drawLayerPieces(GraphicsContext* graphicsContext, const FloatRect& shadowBounds, const RoundedIntRect::Radii& radii, float roundedRadius, const IntSize& templateSize, ShadowDirection direction)
736 graphicsContext->save();
738 graphicsContext->setFillColor(m_color, m_colorSpace);
739 graphicsContext->fillRect(shadowInterior);
741 graphicsContext->restore();
751 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
758 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
763 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
770 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
775 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
780 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
785 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
790 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
810 GraphicsContext* shadowContext = m_layerImage->context();