First public contribution.
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #include "tbrushandpen.h"
20 default brush and pen drawing target size
22 const TSize KDrawBrushPenDefaultSize(640, 450);
24 CTBrushAndPen::CTBrushAndPen()
26 SetTestStepName(KTDirectGdiBrushAndPenStep);
29 CTBrushAndPen::~CTBrushAndPen()
36 GRAPHICS-DIRECTGDI-PENBRUSH-0001
51 Test drawing with brush.
60 Basic test for pen and brush methods.
61 Test the following brush settings:
64 Call drawing functions with the following parameters:
65 colours from the COLOR_TABLE.
71 EForwardDiagonalHatchBrush
73 ERearwardDiagonalHatchBrush
74 ESquareCrossHatchBrush
75 EDiamondCrossHatchBrush
76 Issue shape drawing operations: DrawRect, DrawRoundRect, DrawEllipse, DrawPie, DrawPolygon.
77 Draw overlapping shapes to test correctness of brush transparency.
78 Repeat the drawing in write alpha mode (DrawModeWriteAlpha bitmap).
80 @SYMTestExpectedResults
81 Brush colours and styles should be correctly drawn for each shape and each draw mode.
82 Valid bitmap should be created. This bitmap shall be compared to a reference bitmap.
84 @param aDrawMode the draw mode to run this test in, only DirectGdi::EDrawModePEN and DirectGdi::EDrawModeWriteAlpha
87 void CTBrushAndPen::TestBrushColorAndStyleL(const DirectGdi::TDrawMode aDrawMode)
89 _LIT(KTestName, "PenBrush-BrushColourStyle_%S"); //test case name
90 _LIT(KDrawModePEN, "DrawModePen");
91 _LIT(KDrawModeWriteAlpha, "DrawModeWriteAlpha");
92 TBuf<50> testCaseName;
96 case DirectGdi::EDrawModePEN:
97 testCaseName.Format(KTestName, &KDrawModePEN);
99 case DirectGdi::EDrawModeWriteAlpha:
100 testCaseName.Format(KTestName, &KDrawModeWriteAlpha);
103 // This method should only be called aDrawMode set to DirectGdi::EDrawModePEN or DirectGdi::EDrawModeWriteAlpha
108 if(!iRunningOomTests)
110 INFO_PRINTF1(testCaseName);
116 iGc->SetDrawMode(aDrawMode);
117 TESTNOERROR(iGc->GetError());
119 iGc->SetPenStyle(DirectGdi::ESolidPen);
121 // print two row of shapes
122 // the second one has overlapping shapes to test alpha blending
123 for(TInt j =0; j<2; j++)
125 // draw 8 columns of different shapes with various pen colours
126 // brush colours, and brush styles
127 for(TInt i = 0; i<8; i++)
129 iGc->SetBrushStyle(KBrushStyleTable[i==1?1:i+1]);
131 TInt startx = 10+i*70 - j*i*10;
135 //this is setter helper function, see below method definition
136 SetHashColors(i,j,1);
137 iGc->DrawRect(TRect(startx,starty+10,endx,starty+30));
139 SetHashColors(i,j,2);
140 iGc->DrawRoundRect(TRect(startx,starty+40,endx,starty+60), TSize(10,10));
142 SetHashColors(i,j,3);
143 iGc->DrawPie(TRect(startx,starty+65,endx,starty+125), TPoint(startx,starty+65) , TPoint(endx,starty+65));
145 // below shapes are not necessary to test alpha blending,
146 // so there are drawn only three above shapes with increasing overlap
149 SetHashColors(i,j,4);
150 iGc->DrawEllipse(TRect(startx,starty+130 ,endx,starty+190 ));
152 SetHashColors(i,j,5);
153 CArrayFixFlat<TPoint>* pointList = new (ELeave) CArrayFixFlat<TPoint>(6);
154 CleanupStack::PushL(pointList);
155 pointList->AppendL(TPoint(startx,starty+192));
156 pointList->AppendL(TPoint(startx + 50,starty+242));
157 pointList->AppendL(TPoint(startx + 10,starty+242));
158 pointList->AppendL(TPoint(endx,starty+192));
159 pointList->AppendL(TPoint(endx,starty+262));
160 pointList->AppendL(TPoint(startx,starty+262));
162 DirectGdi::TFillRule fillrule = i%2==0 ? DirectGdi::EAlternate : DirectGdi::EWinding;
164 iGc->DrawPolygon(*pointList ,fillrule);
165 CleanupStack::PopAndDestroy(pointList);
170 // For coverage - test the BrushColor() method works correctly
171 iGc->SetBrushColor(KRgbRed);
172 TESTL(iGc->BrushColor() == KRgbRed);
174 TEST(KErrNone == WriteTargetOutput(iTestParams, TPtrC(testCaseName)));
178 Helper method that sets the current pen and brush colours from a color table. The color table used contains a
179 palette of 16 standard colors ranging from white to black.
180 @param aGeneralIndex Used when indexing into the color table for the pen and brush colors, and for setting their alpha values.
181 @param aAlphaStep Used when setting an alpha value for the pen and the brush, the alpha value is set to (255-aAlphaStep*aGeneralIndex*32).
182 @param aPenBrushIndex Used when indexing into the color table for the pen and brush colors. The pen color is set to
183 KColor16Table[(3*aGeneralIndex+aPenBrushIndex)%16] and the brush color is set to KColor16Table[(5*aGeneralIndex+aPenBrushIndex)%16].
185 void CTBrushAndPen::SetHashColors(TInt aGeneralIndex, TInt aAlphaStep, TInt aPenBrushIndex)
189 penColor = KColor16Table[(3*aGeneralIndex+aPenBrushIndex)%16];
190 penColor.SetAlpha(255-aAlphaStep*aGeneralIndex*32);
191 iGc->SetPenColor(penColor);
192 brushColor = KColor16Table[(5*aGeneralIndex+aPenBrushIndex)%16];
193 brushColor.SetAlpha(255-aAlphaStep*aGeneralIndex*32);
194 iGc->SetBrushColor(brushColor);
199 GRAPHICS-DIRECTGDI-PENBRUSH-0002
214 Test for brush pattern functionality: set a brush pattern for a CDirectGdiContext object,
215 then check it has a brush pattern. Test that the SetBrushOrigin() method works as expected.
224 Test various brush pattern usage scenarios:
225 Set it's brush pattern, then check it has a brush pattern.
226 Check setting a brush pattern both from a CFbsBitmap and from a handle.
227 Test resetting of brush pattern.
228 Call functions that use brush during shapes drawing.
229 Create a brush pattern image and set it as the brush pattern. Draw a rectangle, move
230 the brush origin to various positions and draw more shapes.
232 @SYMTestExpectedResults
233 The rectangle is filled correctly for each different brush origins.
234 Valid bitmap should be created. This bitmap shall be compared to a reference bitmap.
236 void CTBrushAndPen::TestBrushPatternOriginL()
238 _LIT(KTestName, "PenBrush-BrushPatternOrigin"); //test case name
239 if(!iRunningOomTests)
241 INFO_PRINTF1(KTestName);
246 // create patterns programatically so we can test EPatternedBrush
247 TUidPixelFormat pixelFormat = iTestParams.iTargetPixelFormat;
248 TSize patternSize(56,56);
249 CFbsBitmap* pattern = CreateCheckedBoardBitmapL(pixelFormat, patternSize);
250 CleanupStack::PushL(pattern);
252 CFbsBitmap* pattern2 = CreateCheckedBoardBitmapL(pixelFormat, patternSize);
253 CleanupStack::PushL(pattern2);
255 //draw nine columns of different shapes with various settings
256 // of brush style and brush origin
257 for(TInt i = 0; i<9; i++)
264 iGc->ResetBrushPattern();
266 // Set a brush pattern using CFbsBitmap
267 iGc->SetBrushPattern(*pattern);
268 TESTNOERRORL(iGc->GetError());
269 TEST(iGc->HasBrushPattern());
271 iGc->SetBrushStyle(DirectGdi::EPatternedBrush);
276 // Check that ResetBrushPattern works
277 iGc->ResetBrushPattern();
278 TEST(iGc->HasBrushPattern() == EFalse);
280 // Set a brush pattern using a handle
281 iGc->SetBrushPattern(pattern2->Handle());
282 TEST(iGc->HasBrushPattern());
284 iGc->SetBrushStyle(DirectGdi::EPatternedBrush);
287 //change brush origin, and use last settings of brush style
290 // Set a NULL brush pattern, then set the pattern using the handle
291 // for pattern2 (for coverage)
294 iGc->SetBrushPattern(KNullHandle);
295 TESTL(iGc->GetError() == KErrBadHandle);
297 iGc->SetBrushPattern(pattern2->Handle());
298 iGc->SetBrushOrigin(TPoint(10,10));
301 //change brush style and set brush origin
302 // in case 4 change only brush origin
305 iGc->SetBrushStyle(DirectGdi::EForwardDiagonalHatchBrush);
306 iGc->SetPenColor(KRgbGreen);
307 iGc->SetBrushColor(KRgbRed);
308 iGc->SetBrushOrigin(TPoint(i,i));
311 //change brush style and set brush origin
312 // in case 6 change only brush origin
315 iGc->SetBrushStyle(DirectGdi::ESquareCrossHatchBrush);
316 iGc->SetPenColor(KRgbGreen);
317 iGc->SetBrushColor(KRgbRed);
318 iGc->SetBrushOrigin(TPoint(i,i));
321 //change brush style and set brush origin
322 // in case 8 change only brush origin
325 iGc->SetBrushStyle(DirectGdi::EDiamondCrossHatchBrush);
326 iGc->SetPenColor(KRgbGreen);
327 iGc->SetBrushColor(KRgbRed);
328 iGc->SetBrushOrigin(TPoint(i,i));
335 iGc->SetBrushOrigin(TPoint(i,i));
340 //draw a set of shapes using current brush
341 TInt startx = 10+i*70;
345 iGc->DrawRect(TRect(startx,starty+10,endx,starty+30));
346 iGc->DrawRoundRect(TRect(startx,starty+40,endx,starty+60), TSize(10,10));
347 iGc->DrawPie(TRect(startx,starty+70,endx,starty+130), TPoint(startx,starty+70) , TPoint(endx,starty+70));
348 iGc->DrawEllipse(TRect(startx,starty+130 ,endx,starty+190 ));
350 CArrayFixFlat<TPoint>* pointList = new (ELeave) CArrayFixFlat<TPoint>(6);
351 CleanupStack::PushL(pointList);
352 pointList->AppendL(TPoint(startx,starty+200));
353 pointList->AppendL(TPoint(startx + 50,starty+250));
354 pointList->AppendL(TPoint(startx + 10,starty+250));
355 pointList->AppendL(TPoint(endx,starty+200));
356 pointList->AppendL(TPoint(endx,starty+270));
357 pointList->AppendL(TPoint(startx,starty+270));
359 iGc->DrawPolygon(*pointList ,DirectGdi::EAlternate);
360 CleanupStack::PopAndDestroy(pointList);
363 // Check that ResetBrushPattern() works
364 iGc->ResetBrushPattern();
365 TEST(iGc->HasBrushPattern() == EFalse);
368 TESTNOERROR(iGc->GetError());
370 TEST(KErrNone == WriteTargetOutput(iTestParams, KTestName()));
372 CleanupStack::PopAndDestroy(2, pattern);
378 GRAPHICS-DIRECTGDI-PENBRUSH-0003
393 Test pen drawing functionality.
402 Test setting pen colour and size.
404 colours from the COLOR_TABLE.
405 Iterate over various pen sizes.
406 Perform drawing operations that use the pen.
407 Use also overlapping shapes to test alpha blending.
409 @SYMTestExpectedResults
410 Valid bitmap should be created. Shapes will be drawn with correct pen colour and size.
411 This bitmap shall be compared to a reference bitmap.
413 void CTBrushAndPen::TestPenColorSizeL(const DirectGdi::TDrawMode aDrawMode)
415 _LIT(KTestName, "PenBrush-PenColorSize_%S"); //test case name
416 _LIT(KDrawModePEN, "DrawModePen");
417 _LIT(KDrawModeWriteAlpha, "DrawModeWriteAlpha");
418 TBuf<50> testCaseName;
422 case DirectGdi::EDrawModePEN:
423 testCaseName.Format(KTestName, &KDrawModePEN);
426 case DirectGdi::EDrawModeWriteAlpha:
427 testCaseName.Format(KTestName, &KDrawModeWriteAlpha);
431 // This method should only be called aDrawMode set to DirectGdi::EDrawModePEN or DirectGdi::EDrawModeWriteAlpha
436 if(!iRunningOomTests)
438 INFO_PRINTF1(testCaseName);
443 //draw nine columns of different shapes
444 // the last four overlaps to test alpha blending
445 for(TInt i = 0 ; i < 9; i++)
449 iGc->SetBrushStyle(DirectGdi::ESolidBrush);
450 iGc->SetBrushColor(KRgbDarkRed);
454 iGc->SetBrushStyle(DirectGdi::ENullBrush);
458 TInt stfact = (i<5 ? 0 : i);
459 TInt startx = 10+i*70 - stfact*10;
464 iGc->SetPenSize(TSize(i,i));
465 // The sw version allocates memory when you set a pen size and this memory is not freed
466 // until after the __UHEAP_MARKEND macro when running OOM tests, this causes a memory
467 // leak when this test leaves. The following TCleanupItem has been added to reset the pen
468 // size to 1,1 on account of a leave as settting the pen size to 1,1 deletes the allocated
470 CleanupStack::PushL(TCleanupItem(ResetPenSize, iGc));
472 penColor = KColor16Table[(5*i+1)%15+1];
473 penColor.SetAlpha(255-stfact*30);
474 iGc->SetPenColor(penColor);
475 iGc->DrawRect(TRect(startx,10,endx,30));
477 penColor = KColor16Table[(5*i+2)%15+1];
478 penColor.SetAlpha(255-stfact*30);
479 iGc->SetPenColor(penColor);
480 iGc->DrawRoundRect(TRect(startx,40,endx,60), TSize(10,10));
482 penColor = KColor16Table[(5*i+3)%15+1];
483 penColor.SetAlpha(255-stfact*30);
484 iGc->SetPenColor(penColor);
485 iGc->DrawPie(TRect(startx,70,endx,130), TPoint(startx,70), TPoint(endx,70));
487 penColor = KColor16Table[(5*i+4)%15+1];
488 penColor.SetAlpha(255-stfact*30);
489 iGc->SetPenColor(penColor);
490 iGc->DrawEllipse(TRect(startx,135 ,endx,195 ));
492 penColor = KColor16Table[(5*i+5)%15+1];
493 penColor.SetAlpha(255-stfact*30);
494 CArrayFixFlat<TPoint>* pointList = new (ELeave) CArrayFixFlat<TPoint>(6);
495 CleanupStack::PushL(pointList);
496 pointList->AppendL(TPoint(startx,200));
497 pointList->AppendL(TPoint(startx+50,250));
498 pointList->AppendL(TPoint(startx+10,250));
499 pointList->AppendL(TPoint(endx,200));
500 pointList->AppendL(TPoint(endx,270));
501 pointList->AppendL(TPoint(startx,270));
502 iGc->SetPenColor(penColor);
503 iGc->DrawPolygon(*pointList ,DirectGdi::EAlternate);
504 CleanupStack::PopAndDestroy(pointList);
506 penColor = KColor16Table[(5*i+6)%15+1];
507 penColor.SetAlpha(255-stfact*30);
508 CArrayFixFlat<TPoint>* pointListPolyLine = new (ELeave) CArrayFixFlat<TPoint>(4);
509 CleanupStack::PushL(pointListPolyLine);
510 pointListPolyLine->AppendL(TPoint(startx,280));
511 pointListPolyLine->AppendL(TPoint(endx,320));
512 pointListPolyLine->AppendL(TPoint(startx,320));
513 pointListPolyLine->AppendL(TPoint(endx,280));
514 iGc->SetPenColor(penColor);
515 iGc->DrawPolyLine(*pointListPolyLine);
516 CleanupStack::PopAndDestroy(pointListPolyLine);
518 penColor = KColor16Table[(5*i+7)%15+1];
519 penColor.SetAlpha(255-stfact*30);
520 iGc->SetPenColor(penColor);
521 iGc->DrawArc(TRect(startx,330 ,endx, 360),TPoint(endx,330),TPoint(startx,330));
523 penColor = KColor16Table[(5*i+8)%15+1];
524 penColor.SetAlpha(255-stfact*30);
525 iGc->SetPenColor(penColor);
526 iGc->DrawLine(TPoint(startx,355),TPoint(endx,375));
528 penColor = KColor16Table[(5*i+8)%15+1];
529 penColor.SetAlpha(255-stfact*30);
530 pointListPolyLine = new (ELeave) CArrayFixFlat<TPoint>(4);
531 CleanupStack::PushL(pointListPolyLine);
532 pointListPolyLine->AppendL(TPoint(startx,400));
533 pointListPolyLine->AppendL(TPoint(endx,440));
534 pointListPolyLine->AppendL(TPoint(startx,440));
535 pointListPolyLine->AppendL(TPoint(endx,400));
536 iGc->SetPenColor(penColor);
537 iGc->DrawPolyLineNoEndPoint(*pointListPolyLine);
538 CleanupStack::PopAndDestroy(pointListPolyLine);
540 CleanupStack::PopAndDestroy(1);
543 TEST(KErrNone == WriteTargetOutput(iTestParams, TPtrC(testCaseName)));
548 GRAPHICS-DIRECTGDI-PENBRUSH-0004
563 Test drawing with various brush styles.
572 Test setting pen style.
574 Call functions that use pen during shapes drawing and are affected by the pen
575 style (DrawLine(), DrawPolyLine(), DrawRect(), DrawPolygon();.
577 @SYMTestExpectedResults
578 Valid bitmap should be created. Shapes will be drawn with correct pen style. This
579 bitmap shall be compared to a reference bitmap.
581 void CTBrushAndPen::TestPenStyleL()
583 _LIT(KTestName, "PenBrush-PenStyle"); //test case name
584 if(!iRunningOomTests)
586 INFO_PRINTF1(KTestName);
591 //draw nine columns of different shapes with
592 // various pen style settigns
593 for(TInt i = 0 ; i < 9; i++)
595 TInt colindx = ( i < 6 ? i : i+1 );
596 iGc->SetPenStyle(KPenStyleTable[colindx%6]);
598 iGc->SetPenColor(KColor16Table[(i+6)%16]);
599 iGc->DrawRect(TRect(10+i*70,10,70+i*70,30));
601 iGc->DrawLine(TPoint(10+i*70,40),TPoint(70+i*70,190));
602 iGc->DrawLine(TPoint(70+i*70,40),TPoint(10+i*70,190));
604 CArrayFixFlat<TPoint>* pointList = new (ELeave) CArrayFixFlat<TPoint>(6);
605 CleanupStack::PushL(pointList);
606 pointList->AppendL(TPoint(10+i*70,200));
607 pointList->AppendL(TPoint(60+i*70,250));
608 pointList->AppendL(TPoint(20+i*70,250));
609 pointList->AppendL(TPoint(70+i*70,200));
610 pointList->AppendL(TPoint(70+i*70,270));
611 pointList->AppendL(TPoint(10+i*70,270));
613 iGc->DrawPolygon(*pointList ,DirectGdi::EAlternate);
614 CleanupStack::PopAndDestroy(pointList);
616 CArrayFixFlat<TPoint>* pointListPolyLine = new (ELeave) CArrayFixFlat<TPoint>(4);
617 CleanupStack::PushL(pointListPolyLine);
618 pointListPolyLine->AppendL(TPoint(10+i*70,280));
619 pointListPolyLine->AppendL(TPoint(70+i*70,320));
620 pointListPolyLine->AppendL(TPoint(10+i*70,320));
621 pointListPolyLine->AppendL(TPoint(70+i*70,280));
623 iGc->DrawPolyLine(*pointListPolyLine);
625 CleanupStack::PopAndDestroy(pointListPolyLine);
627 iGc->DrawLine(TPoint(10+i*70,370),TPoint(70+i*70,370));
630 TEST(KErrNone == WriteTargetOutput(iTestParams, KTestName()));
635 GRAPHICS-DIRECTGDI-PENBRUSH-0005
656 Test shape drawing functions invalid pen and brush parameters handling.
659 Draw a rectangle with pen style not from DirectGdi::TPenStyle enum.
660 Draw a ellipse with brush style not from DirectGdi::TBrushStyle enum.
661 Use negative pen size.
663 @SYMTestExpectedResults
664 Shapes should be drawn with default brush and pen settings when invalid paramaters are used.
666 void CTBrushAndPen::TestBrushAndPenInvalidParametersL()
668 //there is no way in BitGDI to check if KErrArgument error occured,
669 //so this is test only in DirectGDI
673 _LIT(KTestName, "PenBrush-InvalidParameters"); //test case name
674 if(!iRunningOomTests)
676 INFO_PRINTF1(KTestName);
688 iGc->SetPenStyle(static_cast<DirectGdi::TPenStyle>(-1));
689 CheckErrorsL(KErrArgument, KErrNone, (TText8*)__FILE__, __LINE__);
694 iGc->SetPenStyle(static_cast<DirectGdi::TPenStyle>(10));
695 CheckErrorsL(KErrArgument, KErrNone, (TText8*)__FILE__, __LINE__);
696 iGc->SetPenSize(TSize(3,3));
701 iGc->SetPenStyle(DirectGdi::ESolidPen);
702 iGc->SetPenSize(TSize(-1,-1));
703 CheckErrorsL(KErrArgument, KErrNone, (TText8*)__FILE__, __LINE__);
708 iGc->SetPenStyle(static_cast<DirectGdi::TPenStyle>(-1));
709 CheckErrorsL(KErrArgument, KErrNone, (TText8*)__FILE__, __LINE__);
710 iGc->SetPenSize(TSize(-3,-3));
711 CheckErrorsL(KErrArgument, KErrNone, (TText8*)__FILE__, __LINE__);
716 iGc->SetPenStyle(DirectGdi::ESolidPen);
717 iGc->SetPenSize(TSize(1,1));
718 iGc->SetBrushStyle(static_cast<DirectGdi::TBrushStyle>(-1));
719 CheckErrorsL(KErrArgument, KErrNone, (TText8*)__FILE__, __LINE__);
724 iGc->SetPenStyle(DirectGdi::ESolidPen);
725 iGc->SetPenSize(TSize(1,1));
726 iGc->SetBrushStyle(static_cast<DirectGdi::TBrushStyle>(20));
727 CheckErrorsL(KErrArgument, KErrNone, (TText8*)__FILE__, __LINE__);
732 TInt startx = 5+i*70;
734 iGc->DrawRect(TRect(startx,10,endx,30));
735 TESTNOERROR(iGc->GetError());
736 iGc->DrawRoundRect(TRect(startx,40,endx,60), TSize(10,10));
737 TESTNOERROR(iGc->GetError());
738 iGc->DrawPie(TRect(startx,70,endx,130), TPoint(30,0), TPoint(150,0));
739 TESTNOERROR(iGc->GetError());
740 iGc->DrawEllipse(TRect(startx,130,endx,190));
741 TESTNOERROR(iGc->GetError());
742 iGc->DrawArc(TRect(startx,190,endx,250),TPoint(endx,250),TPoint(startx,190));
743 TESTNOERROR(iGc->GetError());
744 iGc->DrawLine(TPoint(startx,270), TPoint(endx,270));
745 TESTNOERROR(iGc->GetError());
748 TEST(KErrNone == WriteTargetOutput(iTestParams, KTestName()));
752 Override of base class virtual
753 @leave Gets system wide error code
754 @return - TVerdict code
756 TVerdict CTBrushAndPen::doTestStepPreambleL()
758 CTDirectGdiStepBase::doTestStepPreambleL();
759 return TestStepResult();
763 Override of base class pure virtual
764 Our implementation only gets called if the base class doTestStepPreambleL() did
765 not leave. That being the case, the current test result value will be EPass.
766 @leave Gets system wide error code
767 @return TVerdict code
769 TVerdict CTBrushAndPen::doTestStepL()
771 // Test for each pixel format
772 for(TInt targetPixelFormatIndex = iTargetPixelFormatArray.Count() - 1; targetPixelFormatIndex >= 0 ; targetPixelFormatIndex--)
774 iTestParams.iTargetPixelFormat = iTargetPixelFormatArray[targetPixelFormatIndex];
775 SetTargetL(iTestParams.iTargetPixelFormat, EOneContextOneTarget, KDrawBrushPenDefaultSize);
780 CloseTMSGraphicsStep();
781 return TestStepResult();
785 Override of base class pure virtual
786 Lists the tests to be run
788 void CTBrushAndPen::RunTestsL()
790 SetTestStepID(_L("GRAPHICS-DIRECTGDI-PENBRUSH-0001"));
791 TestBrushColorAndStyleL(DirectGdi::EDrawModePEN);
793 SetTestStepID(_L("GRAPHICS-DIRECTGDI-PENBRUSH-0005"));
794 TestBrushAndPenInvalidParametersL();
796 SetTestStepID(_L("GRAPHICS-DIRECTGDI-PENBRUSH-0002"));
797 TestBrushPatternOriginL();
799 SetTestStepID(_L("GRAPHICS-DIRECTGDI-PENBRUSH-0004"));
802 if(!iRunningOomTests || iUseDirectGdi) // disable pen color and size tests for BitGdi Oom
804 SetTestStepID(_L("GRAPHICS-DIRECTGDI-PENBRUSH-0003"));
805 TestPenColorSizeL(DirectGdi::EDrawModePEN);
807 SetTestStepID(_L("GRAPHICS-DIRECTGDI-PENBRUSH-0003"));
808 TestPenColorSizeL(DirectGdi::EDrawModeWriteAlpha);