Searched refs:srcRect (Results 1 - 25 of 36) sorted by relevance

12

/external/webkit/WebCore/platform/graphics/
H A DGeneratedImage.cpp37 void GeneratedImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp) argument
43 if (dstRect.size() != srcRect.size())
44 context->scale(FloatSize(dstRect.width() / srcRect.width(), dstRect.height() / srcRect.height()));
45 context->translate(-srcRect.x(), -srcRect.y());
50 void GeneratedImage::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform, argument
55 FloatRect adjustedSrcRect = srcRect;
H A DFloatRect.cpp122 FloatRect mapRect(const FloatRect& r, const FloatRect& srcRect, const FloatRect& destRect) argument
124 if (srcRect.width() == 0 || srcRect.height() == 0)
127 float widthScale = destRect.width() / srcRect.width();
128 float heightScale = destRect.height() / srcRect.height();
129 return FloatRect(destRect.x() + (r.x() - srcRect.x()) * widthScale,
130 destRect.y() + (r.y() - srcRect.y()) * heightScale,
H A DImage.cpp89 static inline FloatSize calculatePatternScale(const FloatRect& dstRect, const FloatRect& srcRect, Image::TileRule hRule, Image::TileRule vRule) argument
94 scaleX = dstRect.width() / srcRect.width();
96 scaleY = dstRect.height() / srcRect.height();
147 void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect, TileRule hRule, TileRule vRule, ColorSpace styleColorSpace, CompositeOperator op) argument
160 FloatSize scale = calculatePatternScale(dstRect, srcRect, hRule, vRule);
165 float hPhase = scale.width() * srcRect.x();
166 float vPhase = scale.height() * srcRect.y();
168 hPhase -= fmodf(dstRect.width(), scale.width() * srcRect.width()) / 2.0f;
170 vPhase -= fmodf(dstRect.height(), scale.height() * srcRect.height()) / 2.0f;
173 drawPattern(ctxt, srcRect, patternTransfor
[all...]
H A DGradient.cpp67 void Gradient::adjustParametersForTiledDrawing(IntSize& size, FloatRect& srcRect) argument
72 if (srcRect.isEmpty())
77 srcRect.setWidth(1);
78 srcRect.setX(0);
85 srcRect.setHeight(1);
86 srcRect.setY(0);
H A DGeneratedImage.h60 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator);
61 virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform,
H A DImage.h169 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator) = 0;
171 void drawTiled(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, TileRule hRule, TileRule vRule, ColorSpace styleColorSpace, CompositeOperator);
177 virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform,
H A DBitmapImage.h174 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator);
177 virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const TransformationMatrix& patternTransform,
/external/webkit/WebCore/svg/graphics/filters/
H A DSVGFEImage.cpp57 FloatRect srcRect(FloatPoint(), m_image->size());
60 m_preserveAspectRatio.transformRect(destRect, srcRect);
62 filterContext->drawImage(m_image.get(), DeviceColorSpace, destRect, srcRect);
/external/webkit/WebCore/platform/graphics/filters/
H A DFilterEffect.cpp66 FloatRect FilterEffect::calculateDrawingRect(const FloatRect& srcRect) argument
68 FloatPoint startPoint = FloatPoint(srcRect.x() - scaledSubRegion().x(), srcRect.y() - scaledSubRegion().y());
69 FloatRect drawingRect = FloatRect(startPoint, srcRect.size());
H A DFEComposite.cpp131 FloatRect srcRect = FloatRect(0.f, 0.f, -1.f, -1.f);
145 filterContext->drawImage(m_in2->resultImage()->image(), DeviceColorSpace, calculateDrawingRect(m_in2->scaledSubRegion()), srcRect, CompositeDestinationOut);
149 filterContext->drawImage(m_in->resultImage()->image(), DeviceColorSpace, calculateDrawingRect(m_in->scaledSubRegion()), srcRect, CompositeSourceAtop);
153 filterContext->drawImage(m_in->resultImage()->image(), DeviceColorSpace, calculateDrawingRect(m_in->scaledSubRegion()), srcRect, CompositeXOR);
/external/webkit/WebCore/svg/
H A DSVGPreserveAspectRatio.cpp162 void SVGPreserveAspectRatio::transformRect(FloatRect& destRect, FloatRect& srcRect) argument
164 FloatSize imageSize = srcRect.size();
168 float widthToHeightMultiplier = srcRect.height() / srcRect.width();
200 float widthToHeightMultiplier = srcRect.height() / srcRect.width();
203 float destToSrcMultiplier = srcRect.width() / destRect.width();
204 srcRect.setHeight(destRect.height() * destToSrcMultiplier);
209 srcRect.setY(destRect.y() + imageSize.height() / 2.0f - srcRect
[all...]
H A DSVGPreserveAspectRatio.h65 void transformRect(FloatRect& destRect, FloatRect& srcRect);
/external/webkit/WebCore/platform/graphics/skia/
H A DImageSkia.cpp151 SkRect srcRect; local
152 srcRect.set(srcIRect);
218 static void paintSkBitmap(PlatformContextSkia* platformContext, const NativeImageSkia& bitmap, const SkIRect& srcRect, const SkRect& destRect, const SkXfermode::Mode& compOp) argument
233 computeResamplingMode(bitmap, srcRect.width(), srcRect.height(),
237 drawResampledBitmap(*canvas, paint, bitmap, srcRect, destRect);
244 canvas->drawBitmapRect(bitmap, &srcRect, destRect, &paint);
321 SkIRect srcRect = enclosingIntRect(normSrcRect); local
322 bitmap->extractSubset(&srcSubset, srcRect);
331 TransformDimensions(patternTransform, srcRect
408 draw(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp) argument
438 draw(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator compositeOp) argument
[all...]
H A DBitmapImageSingleFrameSkia.h75 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator);
H A DSkiaUtils.h69 // srcRect and destRect can be the same.
70 void ClipRectToCanvas(const SkCanvas&, const SkRect& srcRect, SkRect* destRect);
H A DSkiaUtils.cpp150 void IntersectRectAndRegion(const SkRegion& region, const SkRect& srcRect, SkRect* destRect) { argument
153 srcRect.roundOut(&srcRectRounded);
174 void ClipRectToCanvas(const SkCanvas& canvas, const SkRect& srcRect, SkRect* destRect) { argument
178 canvas.getTotalMatrix().mapRect(&transformedSrc, srcRect);
/external/webkit/WebCore/platform/graphics/wx/
H A DImageWx.cpp179 void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace, CompositeOperator, const FloatRect& dstRect) argument
203 float adjustedX = phase.x() + srcRect.x() *
205 float adjustedY = phase.y() + srcRect.y() *
221 gc->DrawBitmap(*bitmap, adjustedX + currentW, adjustedY + currentH, (wxDouble)srcRect.width(), (wxDouble)srcRect.height());
223 gc->DrawGraphicsBitmap(*bitmap, adjustedX + currentW, adjustedY + currentH, (wxDouble)srcRect.width(), (wxDouble)srcRect.height());
227 (wxCoord)srcRect.width(), (wxCoord)srcRect.height(), &mydc,
228 (wxCoord)srcRect
[all...]
/external/webkit/WebCore/platform/graphics/cg/
H A DImageCG.cpp157 void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& destRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator compositeOp) argument
171 if (currHeight <= srcRect.y())
183 if (srcRect.size() != selfSize) {
189 shouldUseSubimage = (interpolationQuality == kCGInterpolationHigh || interpolationQuality == kCGInterpolationDefault) && srcRect.size() != destRect.size();
190 float xScale = srcRect.width() / destRect.width();
191 float yScale = srcRect.height() / destRect.height();
193 FloatRect subimageRect = srcRect;
194 float leftPadding = srcRect.x() - floorf(srcRect.x());
195 float topPadding = srcRect
[all...]
H A DPDFDocumentImage.cpp149 void PDFDocumentImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator op) argument
158 float hScale = dstRect.width() / srcRect.width();
159 float vScale = dstRect.height() / srcRect.height();
164 CGContextTranslateCTM(context->platformContext(), dstRect.x() - srcRect.x() * hScale, dstRect.y() - srcRect.y() * vScale);
167 CGContextTranslateCTM(context->platformContext(), 0, -srcRect.height());
168 CGContextClipToRect(context->platformContext(), CGRectIntegral(srcRect));
H A DPDFDocumentImage.h61 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator);
/external/webkit/WebCore/platform/graphics/qt/
H A DStillImageQt.h49 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator);
/external/webkit/WebCore/platform/graphics/android/
H A DImageAndroid.cpp189 const FloatRect& srcRect, ColorSpace,
215 round_scaled(&srcR, srcRect, invScaleX, invScaleY);
251 void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& srcRect, argument
282 round_scaled(&srcR, srcRect, 1 / scaleX, 1 / scaleY);
284 round(&srcR, srcRect);
316 float tx = phase.x() + srcRect.x() * patternTransform.a();
317 float ty = phase.y() + srcRect.y() * patternTransform.d();
322 srcRect.x(), srcRect.y(), srcRect
188 draw(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp) argument
[all...]
/external/webkit/WebCore/platform/graphics/cairo/
H A DImageCairo.cpp94 FloatRect srcRect(src);
98 srcRect.width() == 0.0f || srcRect.height() == 0.0f)
130 float scaleX = srcRect.width() / dstRect.width();
131 float scaleY = srcRect.height() / dstRect.height();
132 cairo_matrix_t matrix = { scaleX, 0, 0, scaleY, srcRect.x(), srcRect.y() };
/external/webkit/WebCore/rendering/
H A DRenderSVGImage.cpp89 FloatRect srcRect(0, 0, image()->width(), image()->height());
93 imageElt->preserveAspectRatio().transformRect(destRect, srcRect);
95 paintInfo.context->drawImage(image(), DeviceColorSpace, destRect, srcRect); local
/external/webkit/WebCore/platform/graphics/wince/
H A DImageBufferWince.cpp44 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator);
45 virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform,
51 void BufferedImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator compositeOp) argument
54 IntRect intSrcRect(srcRect);

Completed in 156 milliseconds

12