| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& destRect, const Fl
oatPoint& srcPoint, const FloatSize& scaledTileSize, ColorSpace styleColorSpace,
CompositeOperator op) | 108 void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& destRect, const Fl
oatPoint& srcPoint, const FloatSize& scaledTileSize, ColorSpace styleColorSpace,
CompositeOperator op) |
| 109 { | 109 { |
| 110 if (mayFillWithSolidColor()) { | 110 if (mayFillWithSolidColor()) { |
| 111 fillWithSolidColor(ctxt, destRect, solidColor(), styleColorSpace, op); | 111 fillWithSolidColor(ctxt, destRect, solidColor(), styleColorSpace, op); |
| 112 return; | 112 return; |
| 113 } | 113 } |
| 114 | 114 |
| 115 // See <https://webkit.org/b/59043>. | 115 // See <https://webkit.org/b/59043>. |
| 116 #if !PLATFORM(WX) | 116 #if !PLATFORM(WX) |
| 117 ASSERT(!isBitmapImage() || static_cast<BitmapImage*>(this)->notSolidColor())
; | 117 ASSERT(!isBitmapImage() || notSolidColor()); |
| 118 #endif | 118 #endif |
| 119 | 119 |
| 120 FloatSize intrinsicTileSize = size(); | 120 FloatSize intrinsicTileSize = size(); |
| 121 if (hasRelativeWidth()) | 121 if (hasRelativeWidth()) |
| 122 intrinsicTileSize.setWidth(scaledTileSize.width()); | 122 intrinsicTileSize.setWidth(scaledTileSize.width()); |
| 123 if (hasRelativeHeight()) | 123 if (hasRelativeHeight()) |
| 124 intrinsicTileSize.setHeight(scaledTileSize.height()); | 124 intrinsicTileSize.setHeight(scaledTileSize.height()); |
| 125 | 125 |
| 126 FloatSize scale(scaledTileSize.width() / intrinsicTileSize.width(), | 126 FloatSize scale(scaledTileSize.width() / intrinsicTileSize.width(), |
| 127 scaledTileSize.height() / intrinsicTileSize.height()); | 127 scaledTileSize.height() / intrinsicTileSize.height()); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 vPhase -= fmodf(dstRect.height(), scale.height() * srcRect.height()) / 2
.0f; | 176 vPhase -= fmodf(dstRect.height(), scale.height() * srcRect.height()) / 2
.0f; |
| 177 FloatPoint patternPhase(dstRect.x() - hPhase, dstRect.y() - vPhase); | 177 FloatPoint patternPhase(dstRect.x() - hPhase, dstRect.y() - vPhase); |
| 178 | 178 |
| 179 drawPattern(ctxt, srcRect, patternTransform, patternPhase, styleColorSpace,
op, dstRect); | 179 drawPattern(ctxt, srcRect, patternTransform, patternPhase, styleColorSpace,
op, dstRect); |
| 180 | 180 |
| 181 startAnimation(); | 181 startAnimation(); |
| 182 } | 182 } |
| 183 | 183 |
| 184 | 184 |
| 185 } | 185 } |
| OLD | NEW |