Changeset 87169 in webkit
- Timestamp:
- May 24, 2011 10:45:53 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r87168 r87169 1 2011-05-24 Robin Dunn <robin@alldunn.com> 2 3 Reviewed by Kevin Ollivier. 4 5 [wx] Make sure x and y adjustments are applied to all operations, and fix the calculations 6 for the height and width checks to take into account x and y offsets. 7 8 https://bugs.webkit.org/show_bug.cgi?id=61367 9 10 * platform/graphics/wx/ImageWx.cpp: 11 (WebCore::Image::drawPattern): 12 1 13 2011-05-24 Tony Chang <tony@chromium.org> 2 14 -
trunk/Source/WebCore/platform/graphics/wx/ImageWx.cpp
r56309 r87169 180 180 void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace, CompositeOperator, const FloatRect& dstRect) 181 181 { 182 183 184 182 #if USE(WXGC) 185 183 wxGCDC* context = (wxGCDC*)ctxt->platformContext(); … … 196 194 ctxt->clip(IntRect(dstRect.x(), dstRect.y(), dstRect.width(), dstRect.height())); 197 195 198 float currentW = 0; 199 float currentH = 0; 196 float adjustedX = 0; 197 float adjustedY = 0; 198 199 adjustedX = phase.x() - dstRect.x() * 200 narrowPrecisionToFloat(patternTransform.a()); 201 adjustedY = (phase.y() - dstRect.y() * 202 narrowPrecisionToFloat(patternTransform.d())); 200 203 201 204 #if USE(WXGC) 202 205 wxGraphicsContext* gc = context->GetGraphicsContext(); 203 204 float adjustedX = phase.x() + srcRect.x() *205 narrowPrecisionToFloat(patternTransform.a());206 float adjustedY = phase.y() + srcRect.y() *207 narrowPrecisionToFloat(patternTransform.d());208 209 206 gc->ConcatTransform(patternTransform); 210 207 #else … … 213 210 #endif 214 211 215 wxPoint origin(context->GetDeviceOrigin());216 wxSize clientSize(context->GetSize());217 218 while ( currentW < dstRect.width() && currentW < clientSize.x - origin.x) {219 while ( currentH < dstRect.height() && currentH < clientSize.y - origin.y) {212 float currentW = adjustedX; 213 float currentH = adjustedY; 214 215 while (currentW <= dstRect.x() + dstRect.width()) { 216 while (currentH <= dstRect.y() + dstRect.height()) { 220 217 #if USE(WXGC) 221 218 #if wxCHECK_VERSION(2,9,0) 222 gc->DrawBitmap(*bitmap, adjustedX + currentW, adjustedY +currentH, (wxDouble)srcRect.width(), (wxDouble)srcRect.height());223 #else 224 gc->DrawGraphicsBitmap(*bitmap, adjustedX + currentW, adjustedY +currentH, (wxDouble)srcRect.width(), (wxDouble)srcRect.height());219 gc->DrawBitmap(*bitmap, currentW, currentH, (wxDouble)srcRect.width(), (wxDouble)srcRect.height()); 220 #else 221 gc->DrawGraphicsBitmap(*bitmap, currentW, currentH, (wxDouble)srcRect.width(), (wxDouble)srcRect.height()); 225 222 #endif 226 223 #else … … 232 229 } 233 230 currentW += srcRect.width(); 234 currentH = 0;231 currentH = adjustedY; 235 232 } 236 233 ctxt->restore();
Note: See TracChangeset
for help on using the changeset viewer.