changeset 49 | 35baca0e7a2e |
parent 35 | 85266cc22c7f |
child 67 | 63b81d807542 |
35:85266cc22c7f | 49:35baca0e7a2e |
---|---|
303 drawPixmapCheckOverlap(painter, *target, targetRect, *source, sourceRect); |
303 drawPixmapCheckOverlap(painter, *target, targetRect, *source, sourceRect); |
304 } |
304 } |
305 } |
305 } |
306 else |
306 else |
307 { |
307 { |
308 Q_ASSERT(false && "CopyArea image type not recognized"); |
308 Q_ASSERT_X(false, "Graphics", "CopyArea image type not recognized"); |
309 } |
309 } |
310 break; |
310 break; |
311 } |
311 } |
312 default: |
312 default: |
313 Q_ASSERT(false && "Surface type not recognized"); |
313 Q_ASSERT_X(false, "Graphics", "Surface type not recognized"); |
314 break; |
314 break; |
315 } |
315 } |
316 } |
316 } |
317 |
317 |
318 /* |
318 /* |
444 QRect targetRect = QRect(aDestX, aDestY, aWidth, aHeight); |
444 QRect targetRect = QRect(aDestX, aDestY, aWidth, aHeight); |
445 drawPixmapCheckOverlap(*mPainter, *mSurface.getBindable(), targetRect, *mSurface.getPixmap(), sourceRect); |
445 drawPixmapCheckOverlap(*mPainter, *mSurface.getBindable(), targetRect, *mSurface.getPixmap(), sourceRect); |
446 } |
446 } |
447 else |
447 else |
448 { |
448 { |
449 Q_ASSERT(false && "CopyArea image type not recognized"); |
449 Q_ASSERT_X(false, "Graphics", "CopyArea image type not recognized"); |
450 } |
450 } |
451 break; |
451 break; |
452 } |
452 } |
453 default: |
453 default: |
454 { |
454 { |
455 Q_ASSERT(false && "Surface type not recognized"); |
455 Q_ASSERT_X(false, "Graphics", "Surface type not recognized"); |
456 } |
456 } |
457 } |
457 } |
458 } |
458 } |
459 |
459 |
460 void GraphicsContextImpl::drawArc(int aX, int aY, int aWidth, int aHeight, int aStartAngle, int aArcAngle) |
460 void GraphicsContextImpl::drawArc(int aX, int aY, int aWidth, int aHeight, int aStartAngle, int aArcAngle) |
487 { |
487 { |
488 case EPixmap: |
488 case EPixmap: |
489 mPainter->drawPixmap(x, y, *(aImage->getPixmap())); |
489 mPainter->drawPixmap(x, y, *(aImage->getPixmap())); |
490 break; |
490 break; |
491 default: |
491 default: |
492 Q_ASSERT(false && "Image type not recognized"); |
492 Q_ASSERT_X(false, "Graphics", "Image type not recognized"); |
493 break; |
493 break; |
494 } |
494 } |
495 } |
495 } |
496 |
496 |
497 void GraphicsContextImpl::drawImage(Image* aImage, int aManipulation, int aTx, int aTy, int aTw, int aTh, int aSx, int aSy, int aSw, int aSh) |
497 void GraphicsContextImpl::drawImage(Image* aImage, int aManipulation, int aTx, int aTy, int aTw, int aTh, int aSx, int aSy, int aSw, int aSh) |
511 { |
511 { |
512 case EPixmap: |
512 case EPixmap: |
513 mPainter->drawPixmap(QRect(aTx ,aTy, aTw, aTh), *(aImage->getPixmap()), QRect(aSx, aSy, aSw, aSh)); |
513 mPainter->drawPixmap(QRect(aTx ,aTy, aTw, aTh), *(aImage->getPixmap()), QRect(aSx, aSy, aSw, aSh)); |
514 break; |
514 break; |
515 default: |
515 default: |
516 Q_ASSERT(false && "Image type not recognized"); |
516 Q_ASSERT_X(false, "Graphics", "Image type not recognized"); |
517 break; |
517 break; |
518 } |
518 } |
519 } |
519 } |
520 |
520 |
521 void GraphicsContextImpl::drawLine(int aX1, int aY1, int aX2, int aY2) |
521 void GraphicsContextImpl::drawLine(int aX1, int aY1, int aX2, int aY2) |
1072 case QPainter::CompositionMode_SourceOver: |
1072 case QPainter::CompositionMode_SourceOver: |
1073 return ESrcOver; |
1073 return ESrcOver; |
1074 case QPainter::CompositionMode_Xor: |
1074 case QPainter::CompositionMode_Xor: |
1075 return EXor; |
1075 return EXor; |
1076 default: |
1076 default: |
1077 Q_ASSERT(false && "Blendingmode not recognized"); |
1077 Q_ASSERT_X(false, "Graphics", "Blendingmode not recognized"); |
1078 return 0; |
1078 return 0; |
1079 } |
1079 } |
1080 } |
1080 } |
1081 |
1081 |
1082 void GraphicsContextImpl::getClip(int aClipArray[]) |
1082 void GraphicsContextImpl::getClip(int aClipArray[]) |
1160 case Qt::DashDotLine: |
1160 case Qt::DashDotLine: |
1161 return EStrokeDashDot; |
1161 return EStrokeDashDot; |
1162 case Qt::DashDotDotLine: |
1162 case Qt::DashDotDotLine: |
1163 return EStrokeDashDotDot; |
1163 return EStrokeDashDotDot; |
1164 default: |
1164 default: |
1165 Q_ASSERT(false && "The stroke style is not recognized"); |
1165 Q_ASSERT_X(false, "Graphics", "The stroke style is not recognized"); |
1166 return 0; |
1166 return 0; |
1167 } |
1167 } |
1168 } |
1168 } |
1169 |
1169 |
1170 int GraphicsContextImpl::getTranslateX() |
1170 int GraphicsContextImpl::getTranslateX() |
1216 break; |
1216 break; |
1217 case EXor: |
1217 case EXor: |
1218 mPainter->setCompositionMode(QPainter::CompositionMode_Xor); |
1218 mPainter->setCompositionMode(QPainter::CompositionMode_Xor); |
1219 break; |
1219 break; |
1220 default: |
1220 default: |
1221 Q_ASSERT(false && "Blendingmode not recognized"); |
1221 Q_ASSERT_X(false, "Graphics", "Blendingmode not recognized"); |
1222 return; |
1222 return; |
1223 } |
1223 } |
1224 } |
1224 } |
1225 |
1225 |
1226 bool GraphicsContextImpl::hasClipping() |
1226 bool GraphicsContextImpl::hasClipping() |
1298 break; |
1298 break; |
1299 case EStrokeDashDotDot: |
1299 case EStrokeDashDotDot: |
1300 mPen->setStyle(Qt::DashDotDotLine); |
1300 mPen->setStyle(Qt::DashDotDotLine); |
1301 break; |
1301 break; |
1302 default: |
1302 default: |
1303 Q_ASSERT(false && "The stroke style is not recognized"); |
1303 Q_ASSERT_X(false, "Graphics", "The stroke style is not recognized"); |
1304 return; |
1304 return; |
1305 } |
1305 } |
1306 mPainter->setPen(*mPen); |
1306 mPainter->setPen(*mPen); |
1307 } |
1307 } |
1308 |
1308 |