javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics/qt/graphicscontextimpl.cpp
changeset 35 85266cc22c7f
parent 21 2a9601315dfc
child 48 e0d6e9bd3ca7
equal deleted inserted replaced
26:dc7c549001d5 35:85266cc22c7f
   913     mPainter->drawText(br, flagsAndAlignments, textToDraw);
   913     mPainter->drawText(br, flagsAndAlignments, textToDraw);
   914     // Painter context is restored
   914     // Painter context is restored
   915     mPainter->restore();
   915     mPainter->restore();
   916 }
   916 }
   917 
   917 
       
   918 void GraphicsContextImpl::drawWindowSurface(WindowSurface* aSurface, int aX, int aY, int aWidth, int aHeight)
       
   919 {
       
   920     GFX_LOG_FUNC_CALL();
       
   921     QRect area(aX, aY, aWidth, aHeight);
       
   922     switch(aSurface->getType())
       
   923     {
       
   924         case WsTypeQtImage:
       
   925         {  
       
   926             mPainter->drawImage(area, *aSurface->getQtImage(), area);
       
   927             break;
       
   928         }
       
   929         default:
       
   930             return;   
       
   931     }
       
   932 }
       
   933 
   918 void GraphicsContextImpl::fillArc(int aX, int aY, int aWidth, int aHeight, int aStartAngle, int aArcAngle)
   934 void GraphicsContextImpl::fillArc(int aX, int aY, int aWidth, int aHeight, int aStartAngle, int aArcAngle)
   919 {
   935 {
   920     GFX_LOG_FUNC_CALL();
   936     GFX_LOG_FUNC_CALL();
   921     QPainterPath path(QPointF(aX+(aWidth/2),aY+(aHeight/2)));
   937     QPainterPath path(QPointF(aX+(aWidth/2),aY+(aHeight/2)));
   922     path.arcTo( QRectF(aX, aY, aWidth, aHeight), aStartAngle, aArcAngle );
   938     path.arcTo( QRectF(aX, aY, aWidth, aHeight), aStartAngle, aArcAngle );