graphicsapitest/graphicssvs/wserv/scripts/GRAPHICS-WSERV-WindowGc-PublicApi.script
//
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//
//! @file
//! @SYMTestSuiteName GRAPHICS-WSERV-WindowGc-PublicApi
//! @SYMScriptTestEnvironment This test script requires a basic ROM.
///////////////////////////////////////////////////////////////////////////////
// GRAPHICS-WSERV-WindowGc-PublicApi.script
//
// Tests all public elements of the CWindowGc class
// as a means of confidence that the API works as expected.
//
// The purpose is to provide a regression test suite of PublishedAll APIs for
// CWindowGc related classes.
// Negative testing is performed to confirm that correct errors are returned
// when incorrect parameters are given.
//
// The tests are fully automated.
///////////////////////////////////////////////////////////////////////////////
LOAD_SUITE T_GraphicsWservAPI
// ****************************************************************************
// CWindowGc
// ****************************************************************************
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0001
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0001
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/12/2006
//! @SYMTestCaseDesc CWindowGc(CWsScreenDevice *aDevice): create but not initialise a graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct
//! @SYMTestActions 1. Create and connect a RWsSession
//! 2. Create and construct a CWsScreenDevice within the RWsSession
//! 3. Execute CWindowGc constructor to create a CWindowGc within the CWsScreenDevice
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults CWindowGc object was created without causing panic
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-0001-0001-new_command004
COMMAND scrdev Construct
COMMAND wingc new GRAPHICS-WSERV-WindowGc-PublicApi-0001-0001-new_command007
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0001
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0002
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0002
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/12/2006
//! @SYMTestCaseDesc ~CWindowGc(): destruct a CWindowGc object
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct
//! @SYMTestActions 1. Create and connect a RWsSession
//! 2. Create and construct a CWsScreenDevice within the RWsSession
//! 3. Create a CWindowGc within the CWsScreenDevice
//! 4. Execute destructor to destruct the CWindowGc object
//! 5. Close CWsScreenDevice, RWsSession
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults CWindowGc object was destructed without causing panic
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-0002-0001-new_command004
COMMAND scrdev Construct
COMMAND wingc new GRAPHICS-WSERV-WindowGc-PublicApi-0002-0001-new_command007
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0002
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0003
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0003
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/12/2006
//! @SYMTestCaseDesc Construct(): complete construction of CWindowGc
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct, CWindowGc::Construct
//! @SYMTestActions 1. Create and connect a RWsSession
//! 2. Create and construct a CWsScreenDevice within the RWsSession
//! 3. Create a CWindowGc within the CWsScreenDevice
//! 4. Execute Construct to construct the CWindowGc object
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults Construct() method returns KErrNone without causing panic
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-0003-0001-new_command004
COMMAND scrdev Construct
COMMAND wingc new GRAPHICS-WSERV-WindowGc-PublicApi-0003-0001-new_command007
COMMAND wingc Construct
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0003
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0004
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0004
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/12/2006
//! @SYMTestCaseDesc Activate(RDrawableWindow &aDevice): activate the CWindowGc for a given window (test in RWindow)
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct, RWindowGroup::Construct, RWindow::Construct, CWindowGc::Construct
//! @SYMTestActions 1. Create and construct a simple CWindowGc to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 New and construct a CWindowGc within the CWsScreenDevice
//! 2. New and construct a RWindowGroup within the RWsSession
//! 3. New and construct a RWindow as the child of the RWindowGroup
//! 4. Execute Activate to activate the CWindowGc for the RWindow
//! 5. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults CWindowGc::Activate() method calls without causing panic
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0001-0001-new_command004
COMMAND scrdev Construct
COMMAND wingc new GRAPHICS-WSERV-WindowGc-Setup-0001-0001-new_command007
COMMAND wingc Construct
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-0004-0001-new_command001
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-0004-0001-Construct_command002
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-0004-0001-new_command004
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-0004-0001-Construct_command005
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-0004-0001-Activate_command007
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0004
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0005
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0005
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/12/2006
//! @SYMTestCaseDesc Deactivate(): free the CWindowGc to be used with another window
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct, RWindowGroup::Construct, RWindow::Construct, CWindowGc::Construct & Activate
//! @SYMTestActions 1. Create and construct a simple CWindowGc to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 New and construct a CWindowGc within the CWsScreenDevice
//! 2. New and construct a RWindowGroup within the RWsSession
//! 3. New and construct a RWindow as the child of the RWindowGroup
//! 4. Use Activate to activate the CWindowGc for the RWindow
//! 5. Execute Deactivate to free the CWindowGc from the RWindow
//! 6. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults CWindowGc::Deactivate() method calls without causing panic
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0001-0001-new_command004
COMMAND scrdev Construct
COMMAND wingc new GRAPHICS-WSERV-WindowGc-Setup-0001-0001-new_command007
COMMAND wingc Construct
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-0005-0001-new_command001
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-0005-0001-Construct_command002
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-0005-0001-new_command004
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-0005-0001-Construct_command005
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-0005-0001-Activate_command007
COMMAND wingc Deactivate
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0005
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0006
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0006
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/03/2007
//! @SYMTestCaseDesc Device(): return a pointer to the device for the screen that the WindowGc was last activated on
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct, CWindowGc::Construct
//! @SYMTestActions 1. Create and construct a simple CWindowGc to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 New and construct a CWindowGc within the CWsScreenDevice
//! 2. Execute Device to get the screen device of the CWindowGc
//! and put the returned screen device into 'scrdev1'
//! 3. Use GetScreenNumber to check if the screen number of the returned screen device is as expected 0
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults 1. CWindowGc::Device() method calls without causing panic
//! 2. The screen number of the returned CGraphicsDevice pointer is the same as the default 0
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT CWsScreenDevice scrdev1
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0001-0001-new_command004
COMMAND scrdev Construct
COMMAND wingc new GRAPHICS-WSERV-WindowGc-Setup-0001-0001-new_command007
COMMAND wingc Construct
COMMAND wingc Device GRAPHICS-WSERV-WindowGc-PublicApi-0006-0001-Device_command001
COMMAND scrdev1 GetScreenNumber GRAPHICS-WSERV-WindowGc-PublicApi-0006-0001-GetScreenNumber_command002
COMMAND scrdev1 disown
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0006
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0009
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0009
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 04/01/2007
//! @SYMTestCaseDesc SetClippingRect(const TRect &aRect): set a clipping rectangle to display
//! Uses API elements: RWsSession::Connect & SetAutoFlush,
//! CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct,
//! RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle & DrawRect
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Execute SetClippingRect to set a clipping rectangle to display TRect((20,10),(40,50))
//! 4. Draw and fill rectangle ((10,10),(50,50)) (with part inside and part outside the clipping rectangle)
//! 5. RWindow::EndRedraw() and check if drawing result as expected
//! only drawing in the ClippingRect and not drawn outside the ClippingRect
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. CWindowGc::SetClippingRect() method calls without causing panic
//! 2. the drawing result of testaction 3 & 4
//! 2.1 the rectangle border lines within ClippingRect is drawn with the pen color TRgb(0,0,0)
//! from (20,10) to (40,10) and from (20,49) to (40,49)
//! 2.2 the rectangle area ((40,11),(80,109)) within ClippingRect and inside the drawing rectangle is drawn/filled with the brush color TRgb(255,0,0)
//! 2.3 the rectangle area ((0,0),(20,60)),((40,0),(60,60)), ((20,0),(40,10)), ((40,50),(40,60))
//! outside (left, right, top, bottom of) the ClippingRect is not drawn, with the background color TRgb(255,255,255)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc SetClippingRect GRAPHICS-WSERV-WindowGc-PublicApi-0009-0001-SetClippingRect_command003
COMMAND wingc DrawRect GRAPHICS-WSERV-WindowGc-PublicApi-0009-0001-DrawRect_command004
COMMAND win EndRedraw
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0009-0001-checkLineColor_command008
COMMAND scrdev checkRectColor GRAPHICS-WSERV-WindowGc-PublicApi-0009-0001-checkRectColor_command009
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0009
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0010
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0010
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 04/01/2007
//! @SYMTestCaseDesc CancelClippingRect(): cancel the clipping rectangle
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle & DrawRect & SetClippingRect
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Use SetClippingRect to set a clipping rectangle to display TRect((20,10),(40,50))
//! 4. Execute CancelClippingRect to cancel the clipping rectangle
//! 5. Draw and fill rectangle ((10,10),(50,50)) (with part inside and part outside the canceled clipping rectangle)
//! 6. RWindow::EndRedraw() and check if drawing result as expected
//! the whole drawing result in testaction 5 is displayed as the ClippingRect is canceled
//! 7. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. CWindowGc::CancelClippingRect() method calls without causing panic
//! 2. the drawing result should be exactly the drawing rectangle in testaction 5
//! 2.1 the whole border lines of the drawing rectangle (testaction 5) is drawn with the pen color TRgb(0,0,0)
//! from (10,10) to (50,10), from (49,10) to (49,50), from (10,10) to (10,50), from (10,49) to (50,49)
//! 2.2 inside the drawing rectangle ((11,11),(49,49)) is drawn/filled with the brush color TRgb(255,0,0)
//! 2.3 the rectangle area ((0,0),(10,60)), ((50,0),(60,60)),((10,0),(50,10)), ((10,50),(50,60))
//! outside (left, right, top, bottom of) the drawing rectangle is not drawn, with the background color TRgb(255,255,255)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc SetClippingRect GRAPHICS-WSERV-WindowGc-PublicApi-0010-0001-SetClippingRect_command003
COMMAND wingc CancelClippingRect
COMMAND wingc DrawRect GRAPHICS-WSERV-WindowGc-PublicApi-0010-0001-DrawRect_command005
COMMAND win EndRedraw
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0010-0001-checkLineColor_command009
COMMAND scrdev checkRectColor GRAPHICS-WSERV-WindowGc-PublicApi-0010-0001-checkRectColor_command010
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0010
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0026
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0026
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 15/01/2007
//! @SYMTestCaseDesc MoveTo(const TPoint &aPoint): move the internal drawing position to the specified point, without drawing a line
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle & DrawLineTo, TLinearDDA: Construct & SingleStep
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. MoveTo (20,10) and DrawLineTo(50,30)
//! 4. MoveTo (20,30) and DrawLineTo(10,50)
//! 5. RWindow::EndRedraw() and check the drawing result to see if the DrawLineTo draws a line originated from the point set by previous MoveTo command
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. MoveTo is called without causing panic
//! 2. the drawing result of testaction 3
//! 2.1 the line from (20,10) to (50,30) is drawn with the pen color TRgb(0,0,0)
//! 2.2 as x-delta > y-delta, the lines from (20,10+1) to (50,30+1) and from (20,10-1) to (50,30-1) is not drawn, with the background color TRgb(255,255,255)
//! 2.3 as x-delta > y-delta, the pixel (20-1,10) and (50,30) is not drawn, with the background color TRgb(255,255,255)
//! 3. the drawing result of testaction 4
//! 3.1 the line from (20,30) to (10,50) is drawn with the pen color TRgb(0,0,0)
//! 3.2 as x-delta < y-delta, the lines from (20+1,30) to (10+1,50) and from (20-1,30) to (10-1,50) is not drawn, with the background color TRgb(255,255,255)
//! 3.3 as x-delta < y-delta, the pixel (20,30-1) and (10,50) is not drawn, with the background color TRgb(255,255,255)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc MoveTo GRAPHICS-WSERV-WindowGc-PublicApi-0026-0001-MoveTo_command003
COMMAND wingc DrawLineTo GRAPHICS-WSERV-WindowGc-PublicApi-0026-0001-DrawLineTo_command004
COMMAND wingc MoveTo GRAPHICS-WSERV-WindowGc-PublicApi-0026-0001-MoveTo_command005
COMMAND wingc DrawLineTo GRAPHICS-WSERV-WindowGc-PublicApi-0026-0001-DrawLineTo_command006
COMMAND win EndRedraw
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0026-0001-checkLineColor_command010
COMMAND scrdev checkPixels GRAPHICS-WSERV-WindowGc-PublicApi-0026-0001-checkPixels_command011
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0026
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0027
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0027
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 15/01/2007
//! @SYMTestCaseDesc MoveBy(const TPoint &aPoint): move the internal drawing position by the specified vector, without drawing a line
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle & DrawLineTo, TLinearDDA: Construct & SingleStep
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. MoveBy (20,0), then MoveBy (0,20) and DrawLineTo(50,30)
//! 4. MoveBy (-30,0) and DrawLineTo(10,50)
//! 5. RWindow::EndRedraw() and check the drawing result to see if the DrawLineTo draws a line originated from the point set by previous MoveBy command
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. MoveBy is called without causing panic
//! 2. the drawing result of testaction 3, the origin is (20,20) = (20,0) + (0,20)
//! 2.1 the line from (20,20) to (50,30) is drawn with the pen color TRgb(0,0,0)
//! 2.2 as x-delta > y-delta, the lines from (20,20+1) to (50,30+1) and from (20,20-1) to (50,30-1) is not drawn, with the background color TRgb(255,255,255)
//! 2.3 as x-delta > y-delta, the pixel (20-1,20) and (50,30) is not drawn, with the background color TRgb(255,255,255)
//! 3. the drawing result of testaction 4, the origin is (20,30) = (50,30) + (-30,0)
//! 3.1 the line from (20,30) to (10,50) is drawn with the pen color TRgb(0,0,0)
//! 3.2 as x-delta < y-delta, the lines from (20+1,30) to (10+1,50) and from (20-1,30) to (10-1,50) is not drawn, with the background color TRgb(255,255,255)
//! 3.3 as x-delta < y-delta, the pixel (20,30-1) and (10,50) is not drawn, with the background color TRgb(255,255,255)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc MoveTo GRAPHICS-WSERV-WindowGc-PublicApi-0027-0001-MoveTo_command002
COMMAND wingc MoveBy GRAPHICS-WSERV-WindowGc-PublicApi-0027-0001-MoveBy_command003
COMMAND wingc MoveBy GRAPHICS-WSERV-WindowGc-PublicApi-0027-0001-MoveBy_command004
COMMAND wingc DrawLineTo GRAPHICS-WSERV-WindowGc-PublicApi-0027-0001-DrawLineTo_command005
COMMAND wingc MoveBy GRAPHICS-WSERV-WindowGc-PublicApi-0027-0001-MoveBy_command006
COMMAND wingc DrawLineTo GRAPHICS-WSERV-WindowGc-PublicApi-0027-0001-DrawLineTo_command007
COMMAND win EndRedraw
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0027-0001-checkLineColor_command011
COMMAND scrdev checkPixels GRAPHICS-WSERV-WindowGc-PublicApi-0027-0001-checkPixels_command012
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0027
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0028
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0028
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/12/2006
//! @SYMTestCaseDesc Plot(const TPoint &aPoint): draw a single point
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Draw a point as specified in the test data (25,26)
//! 4. RWindow::EndRedraw() and check if drawing result as expected
//! 5. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw a single point without causing panic
//! 2. the drawing result of testaction 3
//! 2.1 the point (25,26) is drawn with the pen color TRgb(0,0,0)
//! 2.2 its 4 neighbor points (25,26-1),(25,26+1),(25-1,26),(25+1,26), are not drawn, with the background color TRgb(255,255,255)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc Plot GRAPHICS-WSERV-WindowGc-PublicApi-0028-0001-Plot_command003
COMMAND win EndRedraw
COMMAND scrdev checkPixels GRAPHICS-WSERV-WindowGc-PublicApi-0028-0001-checkPixels_command007
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0028
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0029
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0029
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/12/2006
//! @SYMTestCaseDesc DrawArc(const TRect &aRect, const TPoint &aStart, const TPoint &aEnd): draw an arc
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw, CWindowGc::Construct & Activate & Deactivate
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Draw an arc as specified in the test data
//! 4. RWindow::EndRedraw() and check if drawing result as expected
//! 5. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw an arc without causing panic
//! 2. the drawing result is as expected
//! 2.1 the arc line is drawn with the pen color TRgb(0,0,0)
//! only check sample points (81,47) (80,22) (99,35) (90,44) (90,25)
//! 2.2 the adjacent points of the above arc points is not drawn, with the background color TRgb(255,255,255)
//! only check points (80,47) (81,48) (79,22) (80,21) (100,35) (98,35) (60,35)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc DrawArc GRAPHICS-WSERV-WindowGc-PublicApi-0029-0001-DrawArc_command003
COMMAND win EndRedraw
COMMAND scrdev checkPixels GRAPHICS-WSERV-WindowGc-PublicApi-0029-0001-checkPixels_command007
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0029
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0030
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0030
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/12/2006
//! @SYMTestCaseDesc DrawLine(const TPoint &aPoint1, const TPoint &aPoint2): draw a straight line between two points
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, TLinearDDA: Construct & SingleStep
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Draw a straight line from (25,26) to (50,60)
//! 4. RWindow::EndRedraw() and check if drawing result as expected
//! 5. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw a straight line without causing panic
//! 2. the drawing result of testaction 3, straight line from (25,26) to (50,60)
//! 2.1 the line from (25,26) to (50,60) is drawn with the pen color TRgb(0,0,0)
//! 2.2 as x-delta < y-delta, the lines from (25+1,26) to (50+1,60) and from (25-1,26) to (50-1,60) is not drawn, with the background color TRgb(255,255,255)
//! 2.3 as x-delta < y-delta, the pixel (25,26-1) and (50,60) is not drawn, with the background color TRgb(255,255,255)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc DrawLine GRAPHICS-WSERV-WindowGc-PublicApi-0030-0001-DrawLine_command003
COMMAND win EndRedraw
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0030-0001-checkLineColor_command007
COMMAND scrdev checkPixels GRAPHICS-WSERV-WindowGc-PublicApi-0030-0001-checkPixels_command008
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0030
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0031
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0031
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/12/2006
//! @SYMTestCaseDesc DrawLineTo(const TPoint &aPoint): draw a straight line from internal drawing position to a point
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, TLinearDDA: Construct & SingleStep
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. DrawLineTo (40,30) from initial origin (0,0)
//! 4. DrawLineTo (50,60)
//! 5. RWindow::EndRedraw() and check if drawing result as expected
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw a straight line without causing panic
//! 2. the drawing result of testaction 3, straight line from initial origin (0,0) to (40,30)
//! 2.1 the line from (0,0) to (40,30) is drawn with the pen color TRgb(0,0,0)
//! 2.2 as x-delta > y-delta, the lines from (0,0+1) to (40,30+1) and from (0,0-1) to (40,30-1) is not drawn, with the background color TRgb(255,255,255)
//! 2.3 (40,30) is not drawn in testaction 2, but is draw in testaction 3 with the pen color TRgb(0,0,0)
//! 3. the drawing result of testaction 4, straight line from previous destination (40,30) to (50,60)
//! 3.1 the line from (40,30) to (50,60) is drawn with the pen color TRgb(0,0,0)
//! 3.2 as x-delta < y-delta, the lines from (40+1,30) to (50+1,60) and from (40-1,30) to (50-1,60) is not drawn, with the background color TRgb(255,255,255)
//! 3.3 as x-delta < y-delta, the pixel (40,30-1) and (50,60) is not drawn, with the background color TRgb(255,255,255)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc MoveTo GRAPHICS-WSERV-WindowGc-PublicApi-0031-0001-MoveTo_command002
COMMAND wingc DrawLineTo GRAPHICS-WSERV-WindowGc-PublicApi-0031-0001-DrawLineTo_command003
COMMAND wingc DrawLineTo GRAPHICS-WSERV-WindowGc-PublicApi-0031-0001-DrawLineTo_command004
COMMAND win EndRedraw
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0031-0001-checkLineColor_command008
COMMAND scrdev checkPixels GRAPHICS-WSERV-WindowGc-PublicApi-0031-0001-checkPixels_command009
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0031
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0032
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0032
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/12/2006
//! @SYMTestCaseDesc DrawLineBy(const TPoint &aPoint): draw a straight line from internal drawing position, using a vector
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. DrawLineBy (30,40) from initial origin (0,0)
//! 4. DrawLineBy (30,10)
//! 5. RWindow::EndRedraw() and check if drawing result as expected
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw a straight line without causing panic
//! 2. the drawing result of testaction 3, straight line from initial origin (0,0) to (30,40)
//! 2.1 the line from (0,0) to (30,40) is drawn with the pen color TRgb(0,0,0)
//! 2.2 as x-delta < y-delta, the lines from (0+1,0) to (30+1,40) and from (0-1,0) to (30-1,40) is not drawn, with the background color TRgb(255,255,255)
//! 2.3 (30,40) is not drawn, but is draw in testaction 3 with the pen color TRgb(0,0,0)
//! 3. the drawing result of testaction 4, straight line from previous destination (30,40) to (60,50)=(30,40)+vector(30,10)
//! 3.1 the line from (30,40) to (60,50) is drawn with the pen color TRgb(0,0,0)
//! 3.2 as x-delta > y-delta, the lines from (30,40+1) to (60,50+1) and from (30,40-1) to (60,50-1) is not drawn, with the background color TRgb(255,255,255)
//! 3.3 as x-delta > y-delta, the pixel (30-1,40) and (60,50) is not drawn, with the background color TRgb(255,255,255)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc MoveTo GRAPHICS-WSERV-WindowGc-PublicApi-0032-0001-MoveTo_command002
COMMAND wingc DrawLineBy GRAPHICS-WSERV-WindowGc-PublicApi-0032-0001-DrawLineBy_command003
COMMAND wingc DrawLineBy GRAPHICS-WSERV-WindowGc-PublicApi-0032-0001-DrawLineBy_command004
COMMAND win EndRedraw
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0032-0001-checkLineColor_command008
COMMAND scrdev checkPixels GRAPHICS-WSERV-WindowGc-PublicApi-0032-0001-checkPixels_command009
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0032
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0033
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0033
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 25/12/2006
//! @SYMTestCaseDesc DrawPolyLine(const CArrayFix< TPoint > *aPointList): draw a polyline using points in an array
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Read the test data to construct a point array, draw a polyline as the specified data
//! TPoint(30,40), (50,60), (60,50), (70,70), (90,40)
//! 4. RWindow::EndRedraw() and check if drawing result as expected
//! 5. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw a polyline without causing panic
//! 2. the drawing result of testaction 3
//! 2.1 straight lines connected by two consecutive points in the point array, these lines are drawn with the pen color TRgb(0,0,0)
//! from (30,40) to (50,60), from (50,60) to (60,50), from (60,50) to (70,70), from (70,70) to (90,40)
//! 2.2 the last point (90,40) in the point array is drawn with the pen color TRgb(0,0,0)
//! 2.3 other points should not be drawn, with the background color TRgb(255,255,255), check the following sample points
//! the middle point (60,40) of the first and last points in the point array
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc DrawPolyLine GRAPHICS-WSERV-WindowGc-PublicApi-0033-0001-DrawPolyLine_command003
COMMAND win EndRedraw
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0033-0001-checkLineColor_command007
COMMAND scrdev checkPixels GRAPHICS-WSERV-WindowGc-PublicApi-0033-0001-checkPixels_command008
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0033
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0034
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0034
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 27/12/2006
//! @SYMTestCaseDesc DrawPolyLine(const TPoint *aPointList, TInt aNumPoints): draw a polyline using points in a list
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Read the test data to construct a point list, draw a polyline as the specified data
//! TPoint(30,40), (50,60), (60,50), (70,70), (90,30)
//! 4. RWindow::EndRedraw() and check if drawing result as expected
//! 5. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw a polyline without causing panic
//! 2. the drawing result of testaction 3
//! 2.1 straight lines connected by two consecutive points in the point list, these lines are drawn with the pen color TRgb(0,0,0)
//! from (30,40) to (50,60), from (50,60) to (60,50), from (60,50) to (70,70), from (70,70) to (90,30)
//! 2.2 the last point (90,30) in the point list is drawn with the pen color TRgb(0,0,0)
//! 2.3 other points should not be drawn, with the background color TRgb(255,255,255), check the following sample points
//! the middle point (60,35) of the first and last points in the point list
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc DrawPolyLine GRAPHICS-WSERV-WindowGc-PublicApi-0034-0001-DrawPolyLine_command003
COMMAND win EndRedraw
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0034-0001-checkLineColor_command007
COMMAND scrdev checkPixels GRAPHICS-WSERV-WindowGc-PublicApi-0034-0001-checkPixels_command008
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0034
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0035
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0035
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/12/2006
//! @SYMTestCaseDesc DrawPie(const TRect &aRect, const TPoint &aStart, const TPoint &aEnd): draw and fill a pie-shaped slice of an ellipse
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw, CWindowGc::Construct & Activate & Deactivate
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Draw and fill a pie-shaped slice of an ellipse with the specified test data
//! 4. RWindow::EndRedraw() and check if drawing result as expected
//! 5. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw and fill a pie-shaped slice without causing panic
//! 2. the drawing result is as expected
//! 2.1 on the pie boarder is drawn with the pen color TRgb(0,0,0)
//! only check sample points (60,35) (81,47) (80,22) (67,39) (74,43) (67,30) (74,26) (99,35) (90,44) (90,25)
//! 2.2 inside the pie shape is drawn/filled with the brush color TRgb(255,0,0)
//! only check sample points (90,40) (90,30)
//! 2.3 outside the pie shape is not drawn, with the background color TRgb(255,255,255)
//! only check sample points (100,35) (70,25) (70,45)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc DrawPie GRAPHICS-WSERV-WindowGc-PublicApi-0035-0001-DrawPie_command003
COMMAND win EndRedraw
COMMAND scrdev checkPixels GRAPHICS-WSERV-WindowGc-PublicApi-0035-0001-checkPixels_command007
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0035
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0036
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0036
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/12/2006
//! @SYMTestCaseDesc DrawEllipse(const TRect &aRect): draw and fill an ellipse
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw, CWindowGc::Construct & Activate & Deactivate
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Draw and fill an ellipse with the specified test data
//! 4. RWindow::EndRedraw() and check if drawing result as expected
//! 5. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw and fill an ellipse without causing panic
//! 2. the drawing result is as expected
//! 2.1 on the ellipse boarder is drawn with the pen color TRgb(0,0,0)
//! only check sample points (21,35) (99,35) (60,20) (60,49) (40,22) (40,47) (80,22) (80,47)
//! 2.2 inside the ellipse is drawn/filled with the brush color TRgb(255,0,0)
//! only check sample points (60,35)
//! 2.3 outside the ellipse is not drawn, with the background color TRgb(255,255,255)
//! only check sample points (100,50) (100,35) (60,50) (60,10)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc DrawEllipse GRAPHICS-WSERV-WindowGc-PublicApi-0036-0001-DrawEllipse_command003
COMMAND win EndRedraw
COMMAND scrdev checkPixels GRAPHICS-WSERV-WindowGc-PublicApi-0036-0001-checkPixels_command007
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0036
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0037
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0037
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/12/2006
//! @SYMTestCaseDesc DrawRect(const TRect &aRect): draw and fill a rectangle
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Draw and fill a rectangle with the specified test data ((21,20),(80,50))
//! 4. RWindow::EndRedraw() and check if drawing result as expected
//! 5. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw and fill a rectangle without causing panic
//! 2. the drawing result of testaction 3
//! 2.1 the 4 border lines of the drawing rectangle is drawn with the pen color TRgb(0,0,0)
//! from (21,20) to (80,20), from (21,20) to (21,50), from (79,20) to (79,50), from (21,49) to (80,49)
//! 2.2 inside the drawing rectangle ((21+1,20+1),(80-1,50-1)) is drawn/filled with the brush color TRgb(255,0,0)
//! 2.3 the rectangle area ((0,0),(21,60)),((80,0),(100,60)), ((21,0),(80,20)), ((21,50),(80,60))
//! outside (left, right, top, bottom of) the drawing rectangle is not drawn, with the background color TRgb(255,255,255)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc DrawRect GRAPHICS-WSERV-WindowGc-PublicApi-0037-0001-DrawRect_command003
COMMAND win EndRedraw
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0037-0001-checkLineColor_command007
COMMAND scrdev checkRectColor GRAPHICS-WSERV-WindowGc-PublicApi-0037-0001-checkRectColor_command008
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0037
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0038
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0038
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/12/2006
//! @SYMTestCaseDesc DrawRoundRect(const TRect &aRect, const TSize &aEllipse): draw and fill a rectangle with rounded corners
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Draw and fill a rectangle ((21,20),(80,50)) with the rounded corner size (width=10, height=8)
//! 4. RWindow::EndRedraw() and check if drawing result as expected
//! 5. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw and fill a rounded rectangle without causing panic
//! 2. the drawing result of testaction 3
//! 2.1 the 4 border lines of the drawing rectangle is drawn with the pen color TRgb(0,0,0)
//! from (21+10,20) to (80-10,20), from (21,20+8) to (21,50-8), from (79,20+8) to (79,50-8), from (21+10,49) to (80-10,49)
//! 2.2 inside the drawing rectangle is drawn/filled with the brush color TRgb(255,0,0)
//! TRect((21+10,20+1),(80-10,50-1)), ((21+1,20+8),(21+10,50-8)), ((80-10,20+8),(80-1,50-8))
//! 2.3 the rectangle area ((0,0),(21,60)),((80,0),(100,60)), ((21,0),(80,20)), ((21,50),(80,60))
//! outside (left, right, top, bottom of) the drawing rectangle is not drawn, with the background color TRgb(255,255,255)
//! 2.4 over the 4 rounded corners of the drawing rectangle is drawn with the pen color TRgb(0,0,0)
//! sample 2 points for each corner to check: (23,23), (26,21), (23,46), (26,48), (77,23), (74,21), (77,46), (74,48)
//! 2.5 inside the 4 rounded corners is drawn/filled with the brush color TRgb(255,0,0)
//! sample 1 point inside each corner to check: (24,23), (24,46), (76,23), (76,46)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc DrawRoundRect GRAPHICS-WSERV-WindowGc-PublicApi-0038-0001-DrawRoundRect_command003
COMMAND win EndRedraw
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0038-0001-checkLineColor_command007
COMMAND scrdev checkRectColor GRAPHICS-WSERV-WindowGc-PublicApi-0038-0001-checkRectColor_command008
COMMAND scrdev checkPixels GRAPHICS-WSERV-WindowGc-PublicApi-0038-0001-checkPixels_command009
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0038
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0039
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0039
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 26/12/2006
//! @SYMTestCaseDesc DrawPolygon(const CArrayFix< TPoint > *aPointList, TFillRule aFillRule=EAlternate): draw and fill a polygon using points in an array
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Read the test data to construct a point array, draw a polygon as the specified data
//! TPoint(30,40), (50,60), (60,50), (70,70), (90,40)
//! 4. RWindow::EndRedraw() and check if drawing result as expected
//! 5. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw a polygon, return value = KErrNone without causing panic
//! 2. the drawing result of testaction 3
//! 2.1 straight lines connected by two consecutive points in the point array and from the last point to the first one, these lines are drawn with the pen color TRgb(0,0,0)
//! from (30,40) to (50,60), from (50,60) to (60,50), from (60,50) to (70,70), from (70,70) to (90,40), from (90,40) to (30,40)
//! 2.2 inside the drawing polygon is drawn/filled with the brush color TRgb(255,0,0)
//! only check sample points: (60,45)
//! 2.3 outside the drawing polygon should not be drawn, with the background color TRgb(255,255,255)
//! only check sample points: (60,30)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc DrawPolygon GRAPHICS-WSERV-WindowGc-PublicApi-0039-0001-DrawPolygon_command003
COMMAND win EndRedraw
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0039-0001-checkLineColor_command007
COMMAND scrdev checkPixels GRAPHICS-WSERV-WindowGc-PublicApi-0039-0001-checkPixels_command008
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0039
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0040
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0040
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc DrawPolygon(const TPoint *aPointList, TInt aNumPoints, TFillRule aFillRule=EAlternate): draw and fill a polygon using points in a list
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Read the test data to construct a point list, draw a polygon as the specified data
//! TPoint(30,40), (50,60), (60,50), (70,70), (90,40)
//! 4. RWindow::EndRedraw() and check if drawing result as expected
//! 5. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw a polygon, return value = KErrNone without causing panic
//! 2. the drawing result of testaction 3
//! 2.1 straight lines connected by two consecutive points in the point array and from the last point to the first one, these lines are drawn with the pen color TRgb(0,0,0)
//! from (30,40) to (50,60), from (50,60) to (60,50), from (60,50) to (70,70), from (70,70) to (90,40), from (90,40) to (30,40)
//! 2.2 inside the drawing polygon is drawn/filled with the brush color TRgb(255,0,0)
//! only check sample points: (60,45)
//! 2.3 outside the drawing polygon should not be drawn, with the background color TRgb(255,255,255)
//! only check sample points: (60,30)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc DrawPolygon GRAPHICS-WSERV-WindowGc-PublicApi-0040-0001-DrawPolygon_command003
COMMAND win EndRedraw
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0040-0001-checkLineColor_command007
COMMAND scrdev checkPixels GRAPHICS-WSERV-WindowGc-PublicApi-0040-0001-checkPixels_command008
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0040
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0041
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0041
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 02/01/2007
//! @SYMTestCaseDesc DrawBitmap(const TPoint &aTopLeft, const CFbsBitmap *aDevice): draw a bitmap at the specified point
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw & Invalidate,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle & DrawRect, CFbsBitmap::Load, TLinearDDA
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a CFbsBitmap, and SetSizeInTwips to its appropriate size
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute DrawBitmap to draw the bitmap at the specified point, e.g. TPoint(0,0)
//! 5. RWindow::EndRedraw() and check if drawing result as expected
//! !!! Issue: this DrawBitmap result is not displayed (by manual test)
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults Draw a bitmap at the specified point without causing panic
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0041-0001-Load_command002
COMMAND fbsbmp SetSizeInTwips GRAPHICS-WSERV-WindowGc-PublicApi-0041-0001-SetSizeInTwips_command003
COMMAND fbsbmp SizeInTwips
COMMAND fbsbmp SizeInPixels
COMMAND fbsbmp DisplayMode
COMMAND win BeginRedraw
COMMAND wingc DrawBitmap GRAPHICS-WSERV-WindowGc-PublicApi-0041-0001-DrawBitmap_command010
COMMAND win EndRedraw
COMMAND fbsbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0041
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0042
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0042
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 03/01/2007
//! @SYMTestCaseDesc DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aDevice): draw a bitmap in the specified rectangle
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw & Invalidate,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle & DrawRect, CFbsBitmap::Load, TLinearDDA
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a CFbsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute DrawBitmap to draw the bitmap with in the specified destination rectangle, e.g. TRect((10,10),(110,110))
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw a bitmap in the specified rectangle without causing panic
//! 2. the drawing result matched with the scaled bitmap content
//! 2.1 the full bitmap is scaled into the specified destination rectangle on the screen
//! for each destination pixel, use TLinearDDA to map back to its source point within the bitmap
//! 2.2 only the following sub-areas within the destination rectangle are compared
//! TRect((0,0),(20,20)), ((80,0),(100,20)), ((0,80),(20,100)), ((80,80),(100,100))
//! 2.3 check if the destination pixel color is the same as the color of its mapped source point
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0042-0001-Load_command002
COMMAND fbsbmp SizeInTwips
COMMAND fbsbmp SizeInPixels
COMMAND fbsbmp DisplayMode
COMMAND win BeginRedraw
COMMAND wingc DrawBitmap GRAPHICS-WSERV-WindowGc-PublicApi-0042-0001-DrawBitmap_command009
COMMAND win EndRedraw
COMMAND fbsbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0042
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0043
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0043
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 03/01/2007
//! @SYMTestCaseDesc DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aDevice, const TRect &aSourceRect): draw a bitmap from a rectangle into another specified rectangle
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw & Invalidate,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle & DrawRect, CFbsBitmap::Load, TLinearDDA
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a CFbsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute DrawBitmap to draw the bitmap from a rectangle into another specified rectangle
//! e.g. draw bitmap within TRect((20,21),(100,101)) into destination TRect((10,10),(170,170)) on the screen
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw a bitmap from a rectangle into another specified rectangle without causing panic
//! 2. the drawing result matched with the scaled bitmap content
//! 2.1 the bitmap within source rectangle is scaled into the specified destination rectangle on the screen
//! for each destination pixel, use TLinearDDA to map back to its source point within the bitmap
//! 2.2 only the following sub-areas within the destination rectangle are compared
//! TRect((40,40),(60,60)), ((140,40),(160,60)), ((40,140),(60,160)), ((140,140),(160,160))
//! 2.3 check if the destination pixel color is the same as the color of its mapped source point
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0043-0001-Load_command002
COMMAND fbsbmp SizeInTwips
COMMAND fbsbmp SizeInPixels
COMMAND fbsbmp DisplayMode
COMMAND win BeginRedraw
COMMAND wingc DrawBitmap GRAPHICS-WSERV-WindowGc-PublicApi-0043-0001-DrawBitmap_command009
COMMAND win EndRedraw
COMMAND fbsbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0043
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0044
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0044
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 11/04/2007
//! @SYMTestCaseDesc DrawBitmapMasked(const TRect &aDestRect, const CFbsBitmap *aBitmap, const TRect &aSourceRect, const CFbsBitmap *aMaskBitmap, TBool aInvertMask): draw a specified rectangle from a bitmap and its mask into another rectangle
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw & Invalidate,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle & DrawRect, CFbsBitmap::Load, TLinearDDA
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a CFbsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute DrawBitmapMasked to draw a specified rectangle from a bitmap and its mask into another rectangle
//! e.g. draw bitmap within TRect((20,20),(100,100)) into destination TRect((10,10),(170,170)) on the screen
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw a specified rectangle from a bitmap and its mask into another rectangle without causing panic
//! 2. the drawing result matched with the scaled masked bitmap content
//! 2.1 the bitmap within source rectangle is scaled into the specified destination rectangle on the screen
//! for each destination pixel, use TLinearDDA to map back to its source point within the bitmap
//! 2.2 only the following sub-areas within the destination rectangle are compared
//! TRect((40,40),(60,60)), ((140,40),(160,60)), ((40,140),(60,160)), ((140,140),(160,160))
//! 2.3 if the mapped source point is masked, check if the destination pixel color is the default background color, i.e. TRgb(255,255,255)
//! 2.4 if the mapped source point is not masked, check if the destination pixel color is the same as the color of its mapped source point
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
CREATE_OBJECT CFbsBitmap fbsmaskbmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0044-0001-Load_command002
COMMAND fbsbmp SizeInTwips
COMMAND fbsbmp SizeInPixels
COMMAND fbsbmp DisplayMode
COMMAND win BeginRedraw
COMMAND fbsmaskbmp new
COMMAND fbsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0044-0001-Load_command010
COMMAND fbsmaskbmp SizeInTwips
COMMAND fbsmaskbmp SizeInPixels
COMMAND fbsmaskbmp DisplayMode
COMMAND wingc DrawBitmapMasked GRAPHICS-WSERV-WindowGc-PublicApi-0044-0001-DrawBitmapMasked_command015
COMMAND win EndRedraw
COMMAND fbsbmp ~
COMMAND fbsmaskbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0044
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0045
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0045
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 12/04/2007
//! @SYMTestCaseDesc DrawBitmapMasked(const TRect &aDestRect, const CWsBitmap *aBitmap, const TRect &aSourceRect, const CWsBitmap *aMaskBitmap, TBool aInvertMask): draw a specified rectangle from a wserv bitmap and its mask into another rectangle
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw & Invalidate,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle & DrawRect, CFbsBitmap::Load, TLinearDDA
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a CFbsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute DrawBitmapMasked to draw a specified rectangle from a wserv bitmap and its mask into another rectangle
//! e.g. draw bitmap within TRect((20,20),(90,90)) into destination TRect((10,10),(170,170)) on the screen
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Draw a specified rectangle from a wserv bitmap and its mask into another rectangle without causing panic
//! 2. the drawing result matched with the scaled masked bitmap content
//! 2.1 the bitmap within source rectangle is scaled into the specified destination rectangle on the screen
//! for each destination pixel, use TLinearDDA to map back to its source point within the bitmap
//! 2.2 only the following sub-areas within the destination rectangle are compared
//! TRect((40,40),(60,60)), ((140,40),(160,60)), ((40,140),(60,160)), ((140,140),(160,160))
//! 2.3 if the mapped source point is masked, check if the destination pixel color is the default background color, i.e. TRgb(255,255,255)
//! 2.4 if the mapped source point is not masked, check if the destination pixel color is the same as the color of its mapped source point
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CWsBitmap wsbmp
CREATE_OBJECT CWsBitmap wsmaskbmp
COMMAND wsbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0045-0001-new_command001
COMMAND wsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0045-0001-Load_command002
COMMAND wsmaskbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0045-0001-new_command004
COMMAND wsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0045-0001-Load_command005
COMMAND win BeginRedraw
COMMAND wingc DrawBitmapMasked GRAPHICS-WSERV-WindowGc-PublicApi-0045-0001-DrawBitmapMasked_command009
COMMAND win EndRedraw
COMMAND wsbmp ~
COMMAND wsmaskbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0045
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0048
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0048
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 23/01/2007
//! @SYMTestCaseDesc Clear: clear the whole window
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw & Invalidate,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle & DrawRect
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() & EndRedraw() to display the window before clear
//! and check if the screen is displayed in the background color TRgb(255,255,255)
//! 3. Use RWindow::Invalidate & BeginRedraw() to invalidate the whole window and start another redraw cycle
//! 4. Execute Clear to clear the whole window with the brush color TRgb(255,0,0)
//! 5. Use RWindow::EndRedraw() to end redraw cycle and disaply the cleared window
//! and check if cleared result as expected
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Clear the rectangle area of a window without causing panic
//! 2. check the following testing rectangle area within the window
//! TRect((0,0),(20,20)), ((180,0),(200,20)), ((0,180),(20,200)), ((180,180),(200,200))
//! 2.1 before clear the window, all rectangle areas are in the background color TRgb(255,255,255)
//! 2.2 after clear the window, all rectangle areas are in the brush color TRgb(255,0,0)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND win EndRedraw
COMMAND win Invalidate
COMMAND scrdev checkRectColor GRAPHICS-WSERV-WindowGc-PublicApi-0048-0001-checkRectColor_command005
COMMAND win BeginRedraw
COMMAND wingc Clear
COMMAND win EndRedraw
COMMAND scrdev checkRectColor GRAPHICS-WSERV-WindowGc-PublicApi-0048-0001-checkRectColor_command013
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0048
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0049
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0049
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 23/01/2007
//! @SYMTestCaseDesc Clear(const TRect &aRect): clear a rectangle area of a window
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Execute Clear to clear the rectangle area ((11,10),(61,60)) with the brush color TRgb(255,0,0)
//! 4. Use RWindow::EndRedraw() to end redraw cycle and disaply the cleared rectangle
//! and check if cleared result as expected
//! 5. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Clear the rectangle area of a window without causing panic
//! 2. the cleared screen result
//! 2.1 inside the clearing rectangle ((11,10),(41,40)) is drawn/filled with the brush color TRgb(255,0,0)
//! 2.2 the rectangle area ((0,0),(11,50)),((41,0),(50,50)), ((11,0),(41,10)), ((11,40),(41,50))
//! outside (left, right, top, bottom of) the clearing rectangle is not drawn, with the background color TRgb(255,255,255)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc Clear GRAPHICS-WSERV-WindowGc-PublicApi-0049-0001-Clear_command003
COMMAND win EndRedraw
COMMAND scrdev checkRectColor GRAPHICS-WSERV-WindowGc-PublicApi-0049-0001-checkRectColor_command007
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0049
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0050
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0050
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 24/01/2007
//! @SYMTestCaseDesc CopyRect(const TPoint &anOffset, const TRect &aRect): copy a rectangle area from the screen into the window
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle & DrawRect
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw(), draw a rectangle ((10,10),(40,40))
//! then RWindow::EndRedraw() to display the drawing result
//! 3. Execute CopyRect ((0,10),(30,40)) with offset (20,10)
//! i.e. the rectangle ((10,10),(30,40)) area is copied to (20,20)=top-left point(0,10)+offset(20,10)
//! 4. check if the drawing result plus the copy result as expected
//! 5. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Copy the rectangle area of a window without causing panic
//! 2. the drawing result: rectangle ((10,10),(40,40)) + copy-to rectangle ((20,20),(50,50))
//! 2.1 the 4 border lines of the drawing rectangle but outside the copy-to rectangle is drawn with the pen color TRgb(0,0,0)
//! from (10,10) to (10,40), from (10,10) to (40,10), from (10,39) to (20,39), from (39,10) to (39,20)
//! 2.2 inside the drawing rectangle but outside the copy-to rectangle is drawn/filled with the brush color TRgb(255,0,0)
//! TRect((11,11),(20,39)), ((20,11),(39,19))
//! 2.3 inside the copy-to rectangle and copy from original border lines are drawn with the pen color TRgb(0,0,0)
//! from (30,20) to (50,20), from (30,20) to (30,50), from (30,49) to (50,49)
//! 2.4 inside the copy-to rectangle and copy from inner of the drawing rectangle
//! TRect((21,31),(49,49)) is drawn/filled with the brush color TRgb(255,0,0)
//! 2.5 inside the copy-to rectangle and copy from outer of the drawing rectangle
//! TRect((20,20),(30,50)) are not drawn, with the background color TRgb(255,255,255)
//! 2.6 outside both the drawing rectangle and copy-to rectangle is not drawn, with the background color TRgb(255,255,255)
//! TRect((0,0),(10,60)), ((50,0),(60,60)), ((10,0),(50,10)), ((10,50),(50,60)), ((40,10),(50,20)), ((10,40),(20,50))
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc DrawRect GRAPHICS-WSERV-WindowGc-PublicApi-0050-0001-DrawRect_command003
COMMAND win EndRedraw
COMMAND wingc CopyRect GRAPHICS-WSERV-WindowGc-PublicApi-0050-0001-CopyRect_command007
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0050-0001-checkLineColor_command009
COMMAND scrdev checkRectColor GRAPHICS-WSERV-WindowGc-PublicApi-0050-0001-checkRectColor_command010
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0050
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0051
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0051
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 10/01/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aPos, const CFbsBitmap *aBitmap): perform a bitmap block transfer
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CFbsBitmap::Load & SetSizeInTwips
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! . New and Load a CFbsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBlt to perform a bitmap block transfer to the specified point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a bitmap block transfer without causing panic
//! 2. the drawing result of bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((0,0),(40,40)), ((120,120),(160,160)) within the source rectangle
//! 2.2 check if color of the bitmap pixel is the same as that of associated pixel on the screen
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0051-0001-Load_command002
COMMAND fbsbmp SizeInTwips
COMMAND fbsbmp SizeInPixels
COMMAND fbsbmp DisplayMode
COMMAND win BeginRedraw
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0051-0001-BitBlt_command009
COMMAND win EndRedraw
COMMAND fbsbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0051
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0052
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0052
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 10/01/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aDestination, const CFbsBitmap *aBitmap, const TRect &aSource): perform a bitmap block transfer of a rectangular piece of a bitmap
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CFbsBitmap::Load & SetSizeInTwips
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a CFbsBitmap, and SetSizeInTwips to its appropriate size
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBlt to perform a bitmap block transfer of the rectangular piece ((21,20),(101,100)) to the specified point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a bitmap block transfer of the rectangular piece without causing panic
//! 2. the drawing result of bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((0,0),(40,40)), ((40,40),(80,80)) within the source rectangle
//! 2.2 check if color of the bitmap pixel is the same as that of associated pixel on the screen
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0052-0001-Load_command002
COMMAND fbsbmp SizeInTwips
COMMAND fbsbmp SizeInPixels
COMMAND fbsbmp DisplayMode
COMMAND win BeginRedraw
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0052-0001-BitBlt_command009
COMMAND win EndRedraw
COMMAND fbsbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0052
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0053
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0053
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 31/01/2007
//! @SYMTestCaseDesc BitBltMasked(const TPoint &aPoint, const CFbsBitmap *aBitmap, const TRect &aSourceRect, const CFbsBitmap *aMaskBitmap, TBool aInvertMask): perform a masked bitmap block transfer of a rectangular piece of a bitmap
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CFbsBitmap::Load
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a source CFbsBitmap and a mask CFbsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBltMasked to perform a masked bitmap block transfer of the rectangular piece ((0,0),(180,180)) to the specified point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a masked bitmap block transfer of the rectangular piece without causing panic
//! 2. the drawing result of masked bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((40,40),(60,60)), ((140,40),(160,60)), ((40,140),(60,160)), ((140,140),(160,160)) within the source rectangle
//! 2.2 if the bitmap pixel is not masked, check if its color is that of associated pixel on the screen
//! 2.3 if the bitmap pixel is masked, check if it's drawn with the brush color TRgb(255,0,0)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
CREATE_OBJECT CFbsBitmap fbsmaskbmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0053-0001-Load_command002
COMMAND fbsbmp SizeInTwips
COMMAND fbsbmp SizeInPixels
COMMAND fbsbmp DisplayMode
COMMAND fbsmaskbmp new
COMMAND fbsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0053-0001-Load_command008
COMMAND win BeginRedraw
COMMAND wingc BitBltMasked GRAPHICS-WSERV-WindowGc-PublicApi-0053-0001-BitBltMasked_command012
COMMAND win EndRedraw
COMMAND fbsbmp ~
COMMAND fbsmaskbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0053
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0054
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0054
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 11/01/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aPoint, const CWsBitmap *aBitmap): perform a bitmap block transfer on a CWsBitmap
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CWsBitmap::Load
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a CWsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBlt to perform a bitmap block transfer of the CWsBitmap to point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a bitmap block transfer of CWsBitmap without causing panic
//! 2. the drawing result of bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((0,0),(40,40)), ((120,120),(160,160)) within the source rectangle
//! 2.2 check if color of the bitmap pixel is the same as that of associated pixel on the screen
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CWsBitmap wsbmp
COMMAND wsbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0054-0001-new_command001
COMMAND wsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0054-0001-Load_command002
COMMAND win BeginRedraw
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0054-0001-BitBlt_command006
COMMAND win EndRedraw
COMMAND wsbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0054
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0055
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0055
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 11/01/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aDestination, const CWsBitmap *aBitmap, const TRect &aSource): perform a CWsBitmap block transfer of a rectangular piece of a bitmap
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CWsBitmap::Load
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a CWsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBlt to perform a CWsBitmap block transfer of the rectangular piece ((21,20),(101,100)) to the specified point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a bitmap block transfer of the rectangular piece without causing panic
//! 2. the drawing result of bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((0,0),(40,40)), ((40,40),(80,80)) within the source rectangle
//! 2.2 check if color of the bitmap pixel is the same as that of associated pixel on the screen
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CWsBitmap wsbmp
COMMAND wsbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0055-0001-new_command001
COMMAND wsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0055-0001-Load_command002
COMMAND win BeginRedraw
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0055-0001-BitBlt_command006
COMMAND win EndRedraw
COMMAND wsbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0055
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0056
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0056
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 31/01/2007
//! @SYMTestCaseDesc BitBltMasked(const TPoint &aPoint, const CWsBitmap *aBitmap, const TRect &aSourceRect, const CWsBitmap *aMaskBitmap, TBool aInvertMask): perform a masked CWsBitmap block transfer of a rectangular piece of a bitmap
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CWsBitmap::Load
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a source CWsBitmap and a mask CWsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBltMasked to perform a masked CWsBitmap block transfer of the rectangular piece ((0,0),(180,180)) to the specified point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a masked bitmap block transfer of the rectangular piece without causing panic
//! 2. the drawing result of masked bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((40,40),(60,60)), ((140,40),(160,60)), ((40,140),(60,160)), ((140,140),(160,160)) within the source rectangle
//! 2.2 if the bitmap pixel is not masked, check if its color is that of associated pixel on the screen
//! 2.3 if the bitmap pixel is masked, check if it's drawn with the brush color TRgb(255,0,0)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CWsBitmap wsbmp
CREATE_OBJECT CWsBitmap wsmaskbmp
COMMAND wsbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-new_command001
COMMAND wsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-Load_command002
COMMAND wsmaskbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-new_command004
COMMAND wsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-Load_command005
COMMAND win BeginRedraw
COMMAND wingc BitBltMasked GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-BitBltMasked_command009
COMMAND win EndRedraw
COMMAND wsbmp ~
COMMAND wsmaskbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0056
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0061
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0061
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 05/01/2007
//! @SYMTestCaseDesc SetClippingRegion(const TRegion &aRegion): set a clipping region to display
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle & DrawRect
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Execute SetClippingRegion to set a clipping region of TRect((10,10),(20,20)) ((40,10),(50,20)) ((20,20),(40,40)) ((10,40),(20,50)) ((40,40),(50,50))
//! 4. Use DrawRect to draw and fill rectangle ((10,10),(50,50)) (with part inside and part outside the ClippingRegion)
//! 5. RWindow::EndRedraw() and check if drawing result as expected
//! only drawing in the ClippingRegion and not drawn outside the ClippingRegion
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. CWindowGc::SetClippingRegion() method return KErrNone without causing panic
//! 2. the drawing result of testaction 3 & 4
//! 2.1 the rectangle border lines within ClippingRect is drawn with the pen color TRgb(0,0,0)
//! from (10,10) to (20,10), from (40,10) to (50,10), from (10,10) to (10,20), from (10,40) to (10,50), from (10,49) to (20,49), from (40,49) to (50,49), from (49,10) to (49,20), from (49,40) to (49,50)
//! 2.2 the rectangle area within ClippingRegion and inside the drawing rectangle is drawn/filled with the brush color TRgb(255,0,0)
//! TRect((11,11),(20,20)), ((40,11),(49,20)), ((20,20),(40,40)), ((11,40),(20,49)), ((40,40),(49,49))
//! 2.3 the rectangle area outside ClippingRegion but inside the drawing rectangle is not drawn, with the background color TRgb(255,255,255)
//! TRect((20,0),(40,20)), ((10,20),(20,40)), ((40,20),(50,40)), ((20,40),(40,49))
//! 2.4 the rectangle area ((0,0),(10,60)),((50,0),(60,60)), ((10,0),(50,10)), ((10,50),(50,60))
//! outside (left, right, top, bottom of) the ClippingRegion and the drawing rectangle is not drawn, with the background color TRgb(255,255,255)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc SetClippingRegion GRAPHICS-WSERV-WindowGc-PublicApi-0061-0001-SetClippingRegion_command003
COMMAND wingc DrawRect GRAPHICS-WSERV-WindowGc-PublicApi-0061-0001-DrawRect_command004
COMMAND win EndRedraw
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0061-0001-checkLineColor_command008
COMMAND scrdev checkRectColor GRAPHICS-WSERV-WindowGc-PublicApi-0061-0001-checkRectColor_command009
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0061
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0062
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0062
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 05/01/2007
//! @SYMTestCaseDesc CancelClippingRegion(): cancel the clipping region
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle & DrawRect & SetClippingRegion
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. Use RWindow::BeginRedraw() to start a redraw cycle
//! 3. Use SetClippingRegion to set a clipping region of TRect((10,10),(20,20)) ((40,10),(50,20)) ((20,20),(40,40)) ((10,40),(20,50)) ((40,40),(50,50))
//! 4. Execute CancelClippingRegion to cancel the clipping region
//! 5. Use DrawRect to draw and fill rectangle ((10,10),(50,50)) (with part inside and part outside the canceled clipping region)
//! 6. RWindow::EndRedraw() and check if drawing result as expected
//! the whole drawing result in testaction 5 is displayed as the ClippingRegion is canceled
//! 7. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. CWindowGc::CancelClippingRegion() method calls without causing panic
//! 2. the drawing result should be exactly the drawing rectangle in testaction 5
//! 2.1 the whole border lines of the drawing rectangle (testaction 5) is drawn with the pen color TRgb(0,0,0)
//! from (10,10) to (50,10), from (49,10) to (49,50), from (10,10) to (10,50), from (10,49) to (50,49)
//! 2.2 inside the drawing rectangle ((11,11),(49,49)) is drawn/filled with the brush color TRgb(255,0,0)
//! 2.3 the rectangle area ((0,0),(10,60)), ((50,0),(60,60)),((10,0),(50,10)), ((10,50),(50,60))
//! outside (left, right, top, bottom of) the drawing rectangle is not drawn, with the background color TRgb(255,255,255)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
COMMAND win BeginRedraw
COMMAND wingc SetClippingRegion GRAPHICS-WSERV-WindowGc-PublicApi-0062-0001-SetClippingRegion_command003
COMMAND wingc CancelClippingRegion
COMMAND wingc DrawRect GRAPHICS-WSERV-WindowGc-PublicApi-0062-0001-DrawRect_command005
COMMAND win EndRedraw
COMMAND scrdev checkLineColor GRAPHICS-WSERV-WindowGc-PublicApi-0062-0001-checkLineColor_command009
COMMAND scrdev checkRectColor GRAPHICS-WSERV-WindowGc-PublicApi-0062-0001-checkRectColor_command010
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0062
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0066
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0066
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 22/03/2007
//! @SYMTestCaseDesc AlphaBlendBitmaps(const TPoint &aDestPt, const CFbsBitmap *aSrcBmp, const TRect &aSrcRect, const CFbsBitmap *aAlphaBmp, const TPoint &aAlphaPt):
//! perform an alpha blending of the source CFbsBitmap, with the window, using alpha CFbsBitmap as the alpha blending factor
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct, CWindowGc::Construct
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a source CFbsBitmap and a alpha CFbsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute AlphaBlendBitmaps to perform alpha blending of the source CFbsBitmap, with the window, using alpha CFbsBitmap as the alpha blending factor
//! 5. RWindow::EndRedraw() and check if drawing result as expected
//! !!! Note: the rule to check alpha blending still needs to be confirmed
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults 1. CWindowGc::AlphaBlendBitmaps() returns KErrNone without causing panic
//! 2. the drawing result should be match the alpha blending rule
//! only check subareas within the source rectangle: TRect((0,0),(100,20)) ((0,80),(100,100))
//! 2.1 the source (S) is the source bitmap within the specified source rectangle ((0,0),(183,183))
//! 2.2 the window (W) is simply the default background color TRgb(255,255,255)
//! 2.3 the alpha blending factor (A) is from the color of associated point relative to the alpha bitmap
//! Note: the alpha bitmap must be the display mode of Gray level, and the conversion value to Gray256 is the alpha factor
//! 2.4 calculate alpha blending by (S * A + W * (255 - A)) / 255, and for red, green, blue respectively
//! the expected result is mapping the calculated result to the display mode of the screen device
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
CREATE_OBJECT CFbsBitmap fbsalphabmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0066-0001-Load_command002
COMMAND fbsbmp SizeInPixels
COMMAND fbsbmp DisplayMode
COMMAND fbsalphabmp new
COMMAND fbsalphabmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0066-0001-Load_command007
COMMAND fbsalphabmp SizeInPixels
COMMAND fbsalphabmp DisplayMode
COMMAND win BeginRedraw
COMMAND wingc AlphaBlendBitmaps GRAPHICS-WSERV-WindowGc-PublicApi-0066-0001-AlphaBlendBitmaps_command013
COMMAND win EndRedraw
COMMAND fbsbmp ~
COMMAND fbsalphabmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0066
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0067
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0067
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 22/03/2007
//! @SYMTestCaseDesc AlphaBlendBitmaps(const TPoint &aDestPt, const CWsBitmap *aSrcBmp, const TRect &aSrcRect, const CWsBitmap *aAlphaBmp, const TPoint &aAlphaPt):
//! perform an alpha blending of the source CWsBitmap, with the window, using alpha CWsBitmap as the alpha blending factor
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct, CWindowGc::Construct
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a source CWsBitmap and a alpha CWsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute AlphaBlendBitmaps to perform alpha blending of the source CWsBitmap, with the window, using alpha CWsBitmap as the alpha blending factor
//! 5. RWindow::EndRedraw() and check if drawing result as expected
//! !!! Note: the rule to check alpha blending still needs to be confirmed
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults 1. CWindowGc::AlphaBlendBitmaps() returns KErrNone without causing panic
//! 2. the drawing result should be match the alpha blending rule
//! only check subareas within the source rectangle: TRect((0,0),(100,20)) ((0,80),(100,100))
//! 2.1 the source (S) is the source bitmap within the specified source rectangle ((0,0),(183,183))
//! 2.2 the window (W) is simply the default background color TRgb(255,255,255)
//! 2.3 the alpha blending factor (A) is from the color of associated point relative to the alpha bitmap
//! Note: the alpha bitmap must be the display mode of Gray level, and the conversion value to Gray256 is the alpha factor
//! 2.4 calculate alpha blending by (S * A + W * (255 - A)) / 255, and for red, green, blue respectively
//! the expected result is mapping the calculated result to the display mode of the screen device
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CWsBitmap wsbmp
CREATE_OBJECT CWsBitmap wsalphabmp
COMMAND wsbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0067-0001-new_command001
COMMAND wsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0067-0001-Load_command002
COMMAND wsalphabmp new GRAPHICS-WSERV-WindowGc-PublicApi-0067-0001-new_command004
COMMAND wsalphabmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0067-0001-Load_command005
COMMAND win BeginRedraw
COMMAND wingc AlphaBlendBitmaps GRAPHICS-WSERV-WindowGc-PublicApi-0067-0001-AlphaBlendBitmaps_command009
COMMAND win EndRedraw
COMMAND wsbmp ~
COMMAND wsalphabmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0067
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0068
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0068
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 15/02/2007
//! @SYMTestCaseDesc DrawWsGraphic(const TWsGraphicId &aId, const TRect &aDestRect): draw an abstract artwork
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CFbsBitmap::Load, CWsGraphicBitmap::NewL
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a source CFbsBitmap and a mask CFbsBitmap
//! and use them to create a non-transcient artwork CWsGraphicBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute DrawWsGraphic to draw the non-transcient artwork (with its id) and within the specified TRect
//! 5. RWindow::EndRedraw() and check if drawing result as expected
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. CWindowGc::DrawWsGraphic() method calls without causing panic
//! 2. the drawing result of the graphic matched with the masked bitmap content
//! 2.1 Only compare sub-areas within the source rectangle
//! TRect((0,0),(10,10)), ((90,0),(100,10)), ((0,90),(10,100)), ((90,90),(100,100)), ((45,45),(55,55))
//! 2.2 if the bitmap pixel is not masked, check if its color is that of associated pixel on the screen
//! 2.3 if the bitmap pixel is masked, check if it's drawn with the brush color TRgb(255,0,0)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
CREATE_OBJECT CFbsBitmap fbsmaskbmp
CREATE_OBJECT CWsGraphicBitmap wsgraph
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0068-0001-Load_command002
COMMAND fbsmaskbmp new
COMMAND fbsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0068-0001-Load_command005
COMMAND wsgraph NewL GRAPHICS-WSERV-WindowGc-PublicApi-0068-0001-NewL_command007
COMMAND win BeginRedraw
COMMAND wingc DrawWsGraphic GRAPHICS-WSERV-WindowGc-PublicApi-0068-0001-DrawWsGraphic_command011
COMMAND win EndRedraw
COMMAND wsgraph Destroy
COMMAND fbsbmp ~
COMMAND fbsmaskbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0068
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0069
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0069
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 15/02/2007
//! @SYMTestCaseDesc DrawWsGraphic(const TWsGraphicId &aId, const TRect &aDestRect, const TDesC8 &aData): draw an abstract artwork with attached data buffer
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CFbsBitmap::Load, CWsGraphicBitmap::NewL, RWsGraphicMsgBuf::new
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a source CFbsBitmap and a mask CFbsBitmap
//! and use them to create a non-transcient artwork CWsGraphicBitmap
//! 3. New RWsGraphicMsgBuf to be attached to CWindowGc::DrawWsGraphic
//! !!! Note: actually the data buffer is empty
//! 4. Use RWindow::BeginRedraw() to start a redraw cycle
//! 5. Execute DrawWsGraphic to draw the non-transcient artwork (with its id and attached data buffer) and within the specified TRect
//! 6. RWindow::EndRedraw() and check if drawing result as expected
//! 7. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. CWindowGc::DrawWsGraphic() method with attached buufer calls without causing panic
//! 2. the drawing result of the graphic matched with the masked bitmap content
//! 2.1 only compare sub-areas within the source rectangle
//! TRect((0,0),(10,10)), ((90,0),(100,10)), ((0,90),(10,100)), ((90,90),(100,100)), ((45,45),(55,55))
//! 2.2 if the bitmap pixel is not masked, check if its color is that of associated pixel on the screen
//! 2.3 if the bitmap pixel is masked, check if it's drawn with the brush color TRgb(255,0,0)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
CREATE_OBJECT CFbsBitmap fbsmaskbmp
CREATE_OBJECT CWsGraphicBitmap wsgraph
CREATE_OBJECT RWsGraphicMsgBuf wsgraphmsg
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0069-0001-Load_command002
COMMAND fbsmaskbmp new
COMMAND fbsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0069-0001-Load_command005
COMMAND wsgraph NewL GRAPHICS-WSERV-WindowGc-PublicApi-0069-0001-NewL_command007
COMMAND wsgraphmsg new
COMMAND win BeginRedraw
COMMAND wingc DrawWsGraphic GRAPHICS-WSERV-WindowGc-PublicApi-0069-0001-DrawWsGraphic_command013
COMMAND win EndRedraw
COMMAND wsgraph Destroy
COMMAND fbsbmp ~
COMMAND fbsmaskbmp ~
COMMAND wsgraphmsg Close
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0069
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0071
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0071
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 10/01/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aPos, const CFbsBitmap *aBitmap): perform a bitmap block transfer
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CFbsBitmap::Load & SetSizeInTwips
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! . New and Load a CFbsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBlt to perform a bitmap block transfer to the specified point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a bitmap block transfer without causing panic
//! 2. the drawing result of bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((0,0),(40,40)), ((120,120),(160,160)) within the source rectangle
//! 2.2 check if color of the bitmap pixel is the same as that of associated pixel on the screen
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
COMMAND win BeginRedraw
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0051-0001-BitBlt_command009
COMMAND win EndRedraw
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0071
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0072
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0072
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 10/01/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aDestination, const CFbsBitmap *aBitmap, const TRect &aSource): perform a bitmap block transfer of a rectangular piece of a bitmap
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CFbsBitmap::Load & SetSizeInTwips
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a CFbsBitmap, and SetSizeInTwips to its appropriate size
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBlt to perform a bitmap block transfer of the rectangular piece ((21,20),(101,100)) to the specified point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a bitmap block transfer of the rectangular piece without causing panic
//! 2. the drawing result of bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((0,0),(40,40)), ((40,40),(80,80)) within the source rectangle
//! 2.2 check if color of the bitmap pixel is the same as that of associated pixel on the screen
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
COMMAND win BeginRedraw
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0052-0001-BitBlt_command009
COMMAND win EndRedraw
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0072
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0073
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0073
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 31/01/2007
//! @SYMTestCaseDesc BitBltMasked(const TPoint &aPoint, const CFbsBitmap *aBitmap, const TRect &aSourceRect, const CFbsBitmap *aMaskBitmap, TBool aInvertMask): perform a masked bitmap block transfer of a rectangular piece of a bitmap
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CFbsBitmap::Load
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a source CFbsBitmap and a mask CFbsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBltMasked to perform a masked bitmap block transfer of the rectangular piece ((0,0),(180,180)) to the specified point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a masked bitmap block transfer of the rectangular piece without causing panic
//! 2. the drawing result of masked bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((40,40),(60,60)), ((140,40),(160,60)), ((40,140),(60,160)), ((140,140),(160,160)) within the source rectangle
//! 2.2 if the bitmap pixel is not masked, check if its color is that of associated pixel on the screen
//! 2.3 if the bitmap pixel is masked, check if it's drawn with the brush color TRgb(255,0,0)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
CREATE_OBJECT CFbsBitmap fbsmaskbmp
COMMAND fbsmaskbmp new
COMMAND fbsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0053-0001-Load_command008
COMMAND win BeginRedraw
COMMAND wingc BitBltMasked GRAPHICS-WSERV-WindowGc-PublicApi-0053-0001-BitBltMasked_command012
COMMAND win EndRedraw
COMMAND fbsmaskbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0073
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0074
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0074
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 11/01/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aPoint, const CWsBitmap *aBitmap): perform a bitmap block transfer on a CWsBitmap
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CWsBitmap::Load
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a CWsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBlt to perform a bitmap block transfer of the CWsBitmap to point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a bitmap block transfer of CWsBitmap without causing panic
//! 2. the drawing result of bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((0,0),(40,40)), ((120,120),(160,160)) within the source rectangle
//! 2.2 check if color of the bitmap pixel is the same as that of associated pixel on the screen
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CWsBitmap wsbmp
COMMAND win BeginRedraw
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0054-0001-BitBlt_command006
COMMAND win EndRedraw
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0074
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0075
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0075
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 11/01/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aDestination, const CWsBitmap *aBitmap, const TRect &aSource): perform a CWsBitmap block transfer of a rectangular piece of a bitmap
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CWsBitmap::Load
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a CWsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBlt to perform a CWsBitmap block transfer of the rectangular piece ((21,20),(101,100)) to the specified point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a bitmap block transfer of the rectangular piece without causing panic
//! 2. the drawing result of bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((0,0),(40,40)), ((40,40),(80,80)) within the source rectangle
//! 2.2 check if color of the bitmap pixel is the same as that of associated pixel on the screen
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CWsBitmap wsbmp
COMMAND win BeginRedraw
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0055-0001-BitBlt_command006
COMMAND win EndRedraw
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0075
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0076
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0076
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 31/01/2007
//! @SYMTestCaseDesc BitBltMasked(const TPoint &aPoint, const CWsBitmap *aBitmap, const TRect &aSourceRect, const CWsBitmap *aMaskBitmap, TBool aInvertMask): perform a masked CWsBitmap block transfer of a rectangular piece of a bitmap
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CWsBitmap::Load
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a source CWsBitmap and a mask CWsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBltMasked to perform a masked CWsBitmap block transfer of the rectangular piece ((0,0),(180,180)) to the specified point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a masked bitmap block transfer of the rectangular piece without causing panic
//! 2. the drawing result of masked bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((40,40),(60,60)), ((140,40),(160,60)), ((40,140),(60,160)), ((140,140),(160,160)) within the source rectangle
//! 2.2 if the bitmap pixel is not masked, check if its color is that of associated pixel on the screen
//! 2.3 if the bitmap pixel is masked, check if it's drawn with the brush color TRgb(255,0,0)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CWsBitmap wsbmp
CREATE_OBJECT CWsBitmap wsmaskbmp
COMMAND wsmaskbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-new_command004
COMMAND wsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-Load_command005
COMMAND win BeginRedraw
COMMAND wingc BitBltMasked GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-BitBltMasked_command009
COMMAND win EndRedraw
COMMAND wsmaskbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0076
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0081
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0081
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 10/01/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aPos, const CFbsBitmap *aBitmap): perform a bitmap block transfer
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CFbsBitmap::Load & SetSizeInTwips
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! . New and Load a CFbsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBlt to perform a bitmap block transfer to the specified point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a bitmap block transfer without causing panic
//! 2. the drawing result of bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((0,0),(40,40)), ((120,120),(160,160)) within the source rectangle
//! 2.2 check if color of the bitmap pixel is the same as that of associated pixel on the screen
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
COMMAND fbsbmp new
COMMAND win BeginRedraw
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0051-0001-BitBlt_command009
COMMAND win EndRedraw
COMMAND fbsbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0081
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0082
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0082
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 10/01/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aDestination, const CFbsBitmap *aBitmap, const TRect &aSource): perform a bitmap block transfer of a rectangular piece of a bitmap
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CFbsBitmap::Load & SetSizeInTwips
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a CFbsBitmap, and SetSizeInTwips to its appropriate size
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBlt to perform a bitmap block transfer of the rectangular piece ((21,20),(101,100)) to the specified point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a bitmap block transfer of the rectangular piece without causing panic
//! 2. the drawing result of bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((0,0),(40,40)), ((40,40),(80,80)) within the source rectangle
//! 2.2 check if color of the bitmap pixel is the same as that of associated pixel on the screen
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
COMMAND fbsbmp new
COMMAND win BeginRedraw
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0052-0001-BitBlt_command009
COMMAND win EndRedraw
COMMAND fbsbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0082
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0083
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0083
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 31/01/2007
//! @SYMTestCaseDesc BitBltMasked(const TPoint &aPoint, const CFbsBitmap *aBitmap, const TRect &aSourceRect, const CFbsBitmap *aMaskBitmap, TBool aInvertMask): perform a masked bitmap block transfer of a rectangular piece of a bitmap
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CFbsBitmap::Load
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a source CFbsBitmap and a mask CFbsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBltMasked to perform a masked bitmap block transfer of the rectangular piece ((0,0),(180,180)) to the specified point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a masked bitmap block transfer of the rectangular piece without causing panic
//! 2. the drawing result of masked bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((40,40),(60,60)), ((140,40),(160,60)), ((40,140),(60,160)), ((140,140),(160,160)) within the source rectangle
//! 2.2 if the bitmap pixel is not masked, check if its color is that of associated pixel on the screen
//! 2.3 if the bitmap pixel is masked, check if it's drawn with the brush color TRgb(255,0,0)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CFbsBitmap fbsbmp
CREATE_OBJECT CFbsBitmap fbsmaskbmp
COMMAND fbsbmp new
COMMAND fbsmaskbmp new
COMMAND fbsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0053-0001-Load_command008
COMMAND win BeginRedraw
COMMAND wingc BitBltMasked GRAPHICS-WSERV-WindowGc-PublicApi-0053-0001-BitBltMasked_command012
COMMAND win EndRedraw
COMMAND fbsbmp ~
COMMAND fbsmaskbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0083
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0084
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0084
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 11/01/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aPoint, const CWsBitmap *aBitmap): perform a bitmap block transfer on a CWsBitmap
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CWsBitmap::Load
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a CWsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBlt to perform a bitmap block transfer of the CWsBitmap to point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a bitmap block transfer of CWsBitmap without causing panic
//! 2. the drawing result of bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((0,0),(40,40)), ((120,120),(160,160)) within the source rectangle
//! 2.2 check if color of the bitmap pixel is the same as that of associated pixel on the screen
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CWsBitmap wsbmp
COMMAND wsbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0054-0001-new_command001
COMMAND win BeginRedraw
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0054-0001-BitBlt_command006
COMMAND win EndRedraw
COMMAND wsbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0084
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0085
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0085
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 11/01/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aDestination, const CWsBitmap *aBitmap, const TRect &aSource): perform a CWsBitmap block transfer of a rectangular piece of a bitmap
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CWsBitmap::Load
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a CWsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBlt to perform a CWsBitmap block transfer of the rectangular piece ((21,20),(101,100)) to the specified point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a bitmap block transfer of the rectangular piece without causing panic
//! 2. the drawing result of bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((0,0),(40,40)), ((40,40),(80,80)) within the source rectangle
//! 2.2 check if color of the bitmap pixel is the same as that of associated pixel on the screen
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CWsBitmap wsbmp
COMMAND wsbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0055-0001-new_command001
COMMAND win BeginRedraw
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0055-0001-BitBlt_command006
COMMAND win EndRedraw
COMMAND wsbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0085
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0086
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0086
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 31/01/2007
//! @SYMTestCaseDesc BitBltMasked(const TPoint &aPoint, const CWsBitmap *aBitmap, const TRect &aSourceRect, const CWsBitmap *aMaskBitmap, TBool aInvertMask): perform a masked CWsBitmap block transfer of a rectangular piece of a bitmap
//! Uses API elements: RWsSession::Connect & SetAutoFlush, CWsScreenDevice::Construct & GetPixel, RWindowGroup::Construct, RWindow::Construct & BeginRedraw & EndRedraw,
//! CWindowGc::Construct & Activate & Deactivate & SetBrushColor & SetBrushStyle, CWsBitmap::Load
//! @SYMTestActions 1. Setup a CWindowGc to test and a RWindow to display its drawing result
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! and SetRequiredDisplayMode (to EColor4K) for the RWindow, SetBackgroundColor to TRgb(255,255,255)
//! 1.6 SetAutoFlush to TRUE for the RWsSession
//! 1.7 Activate the CWindowGc to the RWindow
//! and SetBrushColor to TRgb(255,0,0) and SetBrushStyle to ESolidBrush
//! 2. New and Load a source CWsBitmap and a mask CWsBitmap
//! 3. Use RWindow::BeginRedraw() to start a redraw cycle
//! 4. Execute BitBltMasked to perform a masked CWsBitmap block transfer of the rectangular piece ((0,0),(180,180)) to the specified point (10,11)
//! 5. RWindow::EndRedraw() to end the redraw cycle and display the drawing result
//! 6. Deactive RWindow, destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults 1. Perform a masked bitmap block transfer of the rectangular piece without causing panic
//! 2. the drawing result of masked bitmap block transfer matched with the bitmap content
//! 2.1 only compare sub-areas of TRect((40,40),(60,60)), ((140,40),(160,60)), ((40,140),(60,160)), ((140,140),(160,160)) within the source rectangle
//! 2.2 if the bitmap pixel is not masked, check if its color is that of associated pixel on the screen
//! 2.3 if the bitmap pixel is masked, check if it's drawn with the brush color TRgb(255,0,0)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Activate_command019
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushColor_command020
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-Setup-0002-0001-SetBrushStyle_command021
CREATE_OBJECT CWsBitmap wsbmp
CREATE_OBJECT CWsBitmap wsmaskbmp
COMMAND wsbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-new_command001
COMMAND wsmaskbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-new_command004
COMMAND wsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-Load_command005
COMMAND win BeginRedraw
COMMAND wingc BitBltMasked GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-BitBltMasked_command009
COMMAND win EndRedraw
COMMAND wsbmp ~
COMMAND wsmaskbmp ~
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0086
//! -----------------------------------------------------------------------------------------
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0101
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0101
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the pen colour.
//! Uses API elements: SetPenColor()
//! @SYMTestActions 1. Construct and connect to RWsSession using new() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using new() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using new(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using new(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the pen colour to red using SetPenColor() and return KErrNone if successed.
//! 13. Draw a rectangle using DrawRect() and return KErrNone if successed.
//! 14. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 15. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults A red rectangle was redraw on the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetPenColor GRAPHICS-WSERV-WindowGc-PublicApi-0101-0001-SetPenColor_command002
COMMAND wingc DrawRect GRAPHICS-WSERV-WindowGc-PublicApi-0200-0001-DrawRect_command002
COMMAND wingc Deactivate
COMMAND win EndRedraw
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0101
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0102
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0102
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the line drawing style for the pen.
//! Uses API elements: SetPenStyle()
//! @SYMTestActions 1. Construct and connect to RWsSession using new() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using new() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using new(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using new(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Set auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the line drawing style to EDotDotDashPen for the pen using SetPenStyle() and return KErrNone if successed.
//! 13. Draw a rectangle using DrawRect() and return KErrNone if successed.
//! 14. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 15. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults A red rectangle was redraw on the graphic context screen with setting EDotDotDashPen pen style on it successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetPenStyle GRAPHICS-WSERV-WindowGc-PublicApi-0102-0001-SetPenStyle_command002
COMMAND wingc DrawRect GRAPHICS-WSERV-WindowGc-PublicApi-0200-0001-DrawRect_command002
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0102
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0103
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0103
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the line drawing size for the pen.
//! Uses API elements: SetPenSize()
//! @SYMTestActions 1. Construct and connect to RWsSession using new() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using new() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using new(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using new(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Set auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the line drawing size to 20 width, 40 height for the pen using SetPenSize() and return KErrNone if successed.
//! 13. Draw a rectangle using DrawRect() and return KErrNone if successed.
//! 14. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 15. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults A rectangle was redraw on the graphic context screen with setting width, height pen size on it successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetPenSize GRAPHICS-WSERV-WindowGc-PublicApi-0103-0001-SetPenSize_command002
COMMAND wingc DrawRect GRAPHICS-WSERV-WindowGc-PublicApi-0200-0001-DrawRect_command002
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0103
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0104
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0104
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the brush colour.
//! Uses API elements: SetBrushColor()
//! @SYMTestActions 1. Construct and connect to RWsSession using new() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using new() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using new(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using new(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Set auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the brush colour using SetBrushColor() and return KErrNone if successed.
//! 13. Draw a Pie with blue colour using DrawPie() and return KErrNone if successed.
//! 14. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 15. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults A blue pie was redraw on the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-PublicApi-0104-0001-SetBrushColor_command002
COMMAND wingc DrawPie GRAPHICS-WSERV-WindowGc-PublicApi-0301-0001-DrawPie_command002
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0104
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0105
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0105
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the line drawing style for the brush.
//! Uses API elements: SetBrushStyle()
//! @SYMTestActions 1. Construct and connect to RWsSession using new() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using new() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using new(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using new(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Draw a Pie with blue colour using DrawPie() and return KErrNone if successed.
//! 13. Sets the line drawing style to ESolidBrush for the brush using SetBrushStyle() and return KErrNone if successed.
//! 14. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 15. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults A blue and solid brush pie was redraw on the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-PublicApi-0104-0001-SetBrushColor_command002
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-PublicApi-0105-0001-SetBrushStyle_command002
COMMAND wingc DrawPie GRAPHICS-WSERV-WindowGc-PublicApi-0301-0001-DrawPie_command002
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0105
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0106
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0106
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the brush pattern origin.
//! Uses API elements: SetBrushOrigin()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Set auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the brush pattern origin using SetBrushOrigin() and return KErrNone if successed.
//! 13. Draw a Pie with the default colour using DrawPie() and return KErrNone if successed.
//! 14. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 15. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults A default clour and solid brush pie was redraw on the define brush origin of the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetBrushOrigin GRAPHICS-WSERV-WindowGc-PublicApi-0106-0001-SetBrushOrigin_command002
COMMAND wingc DrawPie GRAPHICS-WSERV-WindowGc-PublicApi-0302-0001-DrawPie_command002
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0106
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0107
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0107
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the position of the co-ordinate origin.
//! Uses API elements: SetOrigin()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the position of the co-ordinate origin using SetOrigin() and return KErrNone if successed.
//! 13. Draw a rectangle with the default colour using DrawRect() and return KErrNone if successed.
//! 14. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 15. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults A default clour and rectangle was redraw on the position of the co-ordinate origin of the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetOrigin GRAPHICS-WSERV-WindowGc-PublicApi-0107-0001-SetOrigin_command002
COMMAND wingc DrawRect GRAPHICS-WSERV-WindowGc-PublicApi-0200-0001-DrawRect_command002
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0107
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0108
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0108
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the drawing mode.
//! Uses API elements: SetDrawMode()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the pen colour to red using SetPenColor() and return KErrNone if successed.
//! 13. Sets the line drawing size to 20 width, 40 height for the pen using SetPenSize() and return KErrNone if successed.
//! 14. Sets the position of the co-ordinate origin using SetOrigin() and return KErrNone if successed.
//! 15. Sets the drawing mode to EDrawModeXOR using SetDrawMode() and return KErrNone if successed.
//! 16. Draw a rectangle using DrawRect() and return KErrNone if successed.
//! 17. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 18. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults A red rectangle was redraw with drawing mode EDrawModeXOR on the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetPenColor GRAPHICS-WSERV-WindowGc-PublicApi-0101-0001-SetPenColor_command002
COMMAND wingc SetPenSize GRAPHICS-WSERV-WindowGc-PublicApi-0103-0001-SetPenSize_command002
COMMAND wingc SetOrigin GRAPHICS-WSERV-WindowGc-PublicApi-0107-0001-SetOrigin_command002
COMMAND wingc SetDrawMode GRAPHICS-WSERV-WindowGc-PublicApi-0108-0001-SetDrawMode_command002
COMMAND wingc DrawRect GRAPHICS-WSERV-WindowGc-PublicApi-0200-0001-DrawRect_command002
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0108
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0109
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0109
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets and unsets an opaque flag on the window.
//! Uses API elements: SetOpaque()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the pen colour to red using SetPenColor() and return KErrNone if successed.
//! 13. Sets the line drawing size to 20 width, 40 height for the pen using SetPenSize() and return KErrNone if successed.
//! 14. Sets the position of the co-ordinate origin using SetOrigin() and return KErrNone if successed.
//! 15. Sets the drawing mode to EDrawModeXOR using SetDrawMode() and return KErrNone if successed.
//! 16. Draw a rectangle using DrawRect() and return KErrNone if successed.
//! 17. Sets an opaque flag on the window and return KErrNone if successed.
//! 18. Sets the pen colour to green using SetPenColor() and return KErrNone if successed.
//! 19. Draw a Pie with blue colour using DrawPie() and return KErrNone if successed.
//! 20. Sets the line drawing style to ESolidBrush for the brush using SetBrushStyle() and return KErrNone if successed.
//! 21. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 22. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults A an opaque rectangle was redraw with drawing mode EDrawModeXOR on the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetPenColor GRAPHICS-WSERV-WindowGc-PublicApi-0101-0001-SetPenColor_command002
COMMAND wingc SetPenSize GRAPHICS-WSERV-WindowGc-PublicApi-0103-0001-SetPenSize_command002
COMMAND wingc SetOrigin GRAPHICS-WSERV-WindowGc-PublicApi-0107-0001-SetOrigin_command002
COMMAND wingc SetDrawMode GRAPHICS-WSERV-WindowGc-PublicApi-0108-0001-SetDrawMode_command002
COMMAND wingc DrawRect GRAPHICS-WSERV-WindowGc-PublicApi-0200-0001-DrawRect_command002
COMMAND wingc SetOpaque GRAPHICS-WSERV-WindowGc-PublicApi-0109-0001-SetOpaque_command002
COMMAND wingc SetPenColor GRAPHICS-WSERV-WindowGc-PublicApi-0109-0001-SetPenColor_command003
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-PublicApi-0104-0001-SetBrushColor_command002
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-PublicApi-0105-0001-SetBrushStyle_command002
COMMAND wingc DrawPie GRAPHICS-WSERV-WindowGc-PublicApi-0301-0001-DrawPie_command002
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0109
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0110
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0110
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets whether the graphics context is faded.
//! Uses API elements: SetFaded()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Set auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the graphics context to faded using SetFaded() and return KErrNone if successed.
//! 13. Sets the pen colour to red using SetPenColor() and return KErrNone if successed.
//! 14. Sets the line drawing size to 20 width, 40 height for the pen using SetPenSize() and return KErrNone if successed.
//! 15. Sets the position of the co-ordinate origin using SetOrigin() and return KErrNone if successed.
//! 16. Sets the drawing mode to EDrawModeXOR using SetDrawMode() and return KErrNone if successed.
//! 17. Draw a rectangle using DrawRect() and return KErrNone if successed.
//! 18. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 19. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults A an faded rectangle was redraw on the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetFaded GRAPHICS-WSERV-WindowGc-PublicApi-0110-0001-SetFaded_command002
COMMAND wingc SetPenColor GRAPHICS-WSERV-WindowGc-PublicApi-0101-0001-SetPenColor_command002
COMMAND wingc SetPenSize GRAPHICS-WSERV-WindowGc-PublicApi-0103-0001-SetPenSize_command002
COMMAND wingc SetOrigin GRAPHICS-WSERV-WindowGc-PublicApi-0107-0001-SetOrigin_command002
COMMAND wingc SetDrawMode GRAPHICS-WSERV-WindowGc-PublicApi-0108-0001-SetDrawMode_command002
COMMAND wingc DrawRect GRAPHICS-WSERV-WindowGc-PublicApi-0200-0001-DrawRect_command002
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0110
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0111
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0111
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the fading parameters.
//! Uses API elements: SetFadingParameters()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the fading parameters using SetFadingParameters() with BlackMap to 100, WhiteMap to 100 and return KErrNone if successed.
//! 13. Sets the pen colour to red using SetPenColor() and return KErrNone if successed.
//! 14. Sets the line drawing size to 20 width, 40 height for the pen using SetPenSize() and return KErrNone if successed.
//! 15. Sets the position of the co-ordinate origin using SetOrigin() and return KErrNone if successed.
//! 16. Draw a Pie with blue colour using DrawPie() and return KErrNone if successed.
//! 17. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 18. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults A an faded pie was redraw on the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetFadingParameters GRAPHICS-WSERV-WindowGc-PublicApi-0111-0001-SetFadingParameters_command002
COMMAND wingc SetPenColor GRAPHICS-WSERV-WindowGc-PublicApi-0101-0001-SetPenColor_command002
COMMAND wingc SetPenSize GRAPHICS-WSERV-WindowGc-PublicApi-0103-0001-SetPenSize_command002
COMMAND wingc SetOrigin GRAPHICS-WSERV-WindowGc-PublicApi-0107-0001-SetOrigin_command002
COMMAND wingc DrawPie GRAPHICS-WSERV-WindowGc-PublicApi-0301-0001-DrawPie_command002
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0111
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0112
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0112
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the origin used for colour dithering.
//! Uses API elements: SetDitherOrigin()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the origin used for colour dithering using SetDitherOrigin() with position (250,25) and return KErrNone if successed.
//! 13. Sets the pen colour to red using SetPenColor() and return KErrNone if successed.
//! 14. Sets the line drawing size to 20 width, 40 height for the pen using SetPenSize() and return KErrNone if successed.
//! 15. Sets the position of the co-ordinate origin using SetOrigin() and return KErrNone if successed.
//! 16. Draw a Pie with the default colour using DrawPie() and return KErrNone if successed.
//! 17. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 18. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults A colour dithering of the origin pie was redraw on the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetDitherOrigin GRAPHICS-WSERV-WindowGc-PublicApi-0112-0001-SetDitherOrigin_command002
COMMAND wingc SetPenColor GRAPHICS-WSERV-WindowGc-PublicApi-0101-0001-SetPenColor_command002
COMMAND wingc SetPenSize GRAPHICS-WSERV-WindowGc-PublicApi-0103-0001-SetPenSize_command002
COMMAND wingc SetOrigin GRAPHICS-WSERV-WindowGc-PublicApi-0107-0001-SetOrigin_command002
COMMAND wingc DrawPie GRAPHICS-WSERV-WindowGc-PublicApi-0302-0001-DrawPie_command002
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0112
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0113
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0113
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Re-maps pixel colours within a rectangle.
//! Uses API elements: MapColors()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the brush colour using SetBrushColor() and return KErrNone if successed.
//! 13. Sets the line drawing style to ESolidBrush for the brush using SetBrushStyle() and return KErrNone if successed.
//! 14. Draw a Pie with the default colour using DrawPie() and return KErrNone if successed.
//! 15. Re-maps pixel colours within a rectangle using MapColors() and return KErrNone if successed.
//! 17. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 18. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults A Re-maps pixel colours of the origin pie was redraw on the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-PublicApi-0104-0001-SetBrushColor_command002
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-PublicApi-0105-0001-SetBrushStyle_command002
COMMAND wingc DrawPie GRAPHICS-WSERV-WindowGc-PublicApi-0301-0001-DrawPie_command002
COMMAND wingc MapColors GRAPHICS-WSERV-WindowGc-PublicApi-0113-0001-MapColors_command002
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0113
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0114
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0114
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the brush pattern to the specified bitmap.
//! Uses API elements: UseBrushPattern()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Construct and Initialize the CFbsBitmap using new() and return KErrNone if successed.
//! 13. Loading the specific bitmap by using Load() and return KErrNone if successed.
//! 14. Sets the brush pattern to the specified bitmap by using UseBrushPattern() and return KErrNone if successed.
//! 15. Draw a Pie with the default colour using DrawPie() and return KErrNone if successed.
//! 16. Discards a non-built-in brush pattern to free up the memory used for the bitmap and return KErrNone if successed.
//! 17. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 18. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults A bitmap as brush pattern of the origin pie was redraw on the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
CREATE_OBJECT CFbsBitmap fbsBitmap
COMMAND fbsBitmap new
COMMAND fbsBitmap Load GRAPHICS-WSERV-WindowGc-PublicApi-0115-0001-Load_command003
COMMAND wingc UseBrushPattern GRAPHICS-WSERV-WindowGc-PublicApi-0115-0001-UseBrushPattern_command005
COMMAND wingc SetPenStyle GRAPHICS-WSERV-WindowGc-PublicApi-0115-0001-SetPenStyle_command006
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-PublicApi-0115-0001-SetBrushStyle_command007
COMMAND wingc DrawPie GRAPHICS-WSERV-WindowGc-PublicApi-0301-0001-DrawPie_command002
COMMAND wingc DiscardBrushPattern
COMMAND wingc Deactivate
COMMAND win EndRedraw
COMMAND fbsBitmap ~
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0114
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0115
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0115
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the context's font to current graphic context, and draw the text on the context, then discard font from the memory.
//! Uses API elements: UseFont(), DrawText() and DiscardFont()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the pen colour to red using SetPenColor() and return KErrNone if successed.
//! 13. Sets the context's font to current graphic context by using UseFont() and return KErrNone if successed.
//! 14. Draws the text with defined font on graphic context screen by using DrawText() and return KErrNone if successed.
//! 15. Discards the font and frees up the memory used by using DiscardFont() and return KErrNone if successed.
//! 17. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 18. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults The text with defined font and color was redraw on the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetPenColor GRAPHICS-WSERV-WindowGc-PublicApi-0101-0001-SetPenColor_command002
CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1
CREATE_OBJECT CFbsFont CFbsFont1
COMMAND CFbsTypefaceStore1 NewL
COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-GetNearestFontToDesignHeightInPixels_command001
COMMAND wingc UseFont GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-UseFont_command002
COMMAND wingc DrawText GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-DrawText_command003
COMMAND wingc DiscardFont
COMMAND CFbsTypefaceStore1 ~
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0115
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0116
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0116
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the context's font to current graphic context, and draw the text on the context, then discard font from the memory.
//! Uses API elements: UseFont(), DrawText() and DiscardFont()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the pen colour to red using SetPenColor() and return KErrNone if successed.
//! 13. Sets the context's font to current graphic context by using UseFont() and return KErrNone if successed.
//! 14. Draws the text with baseline Offset, text align, left margin and defined font to graphic context by using DrawText() and return KErrNone if successed.
//! 15. Discards the font and frees up the memory used by using DiscardFont() and return KErrNone if successed.
//! 17. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 18. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults The text with defined font and color was redraw on the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetPenColor GRAPHICS-WSERV-WindowGc-PublicApi-0101-0001-SetPenColor_command002
CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1
CREATE_OBJECT CFbsFont CFbsFont1
COMMAND CFbsTypefaceStore1 NewL
COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-GetNearestFontToDesignHeightInPixels_command001
COMMAND wingc UseFont GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-UseFont_command002
COMMAND wingc DrawText GRAPHICS-WSERV-WindowGc-PublicApi-0118-0001-DrawText_command003
COMMAND wingc DiscardFont
COMMAND CFbsTypefaceStore1 ~
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0116
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0117
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0117
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets word justification.
//! Uses API elements: SetWordJustification()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Sets required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Sets window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets word justification by using SetWordJustification() and return KErrNone if successed.
//! 12. Sets the pen colour to red using SetPenColor() and return KErrNone if successed.
//! 13. Sets the context's font to current graphic context by using UseFont() and return KErrNone if successed.
//! 14. Draws the text with defined font on graphic context screen by using DrawText() and return KErrNone if successed.
//! 15. Discards the font and frees up the memory used by using DiscardFont() and return KErrNone if successed.
//! 17. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 18. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults The text with defined font and color was redraw on the graphic context screen with word justification successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetWordJustification GRAPHICS-WSERV-WindowGc-PublicApi-0119-0001-SetWordJustification_command002
COMMAND wingc SetPenColor GRAPHICS-WSERV-WindowGc-PublicApi-0101-0001-SetPenColor_command002
CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1
CREATE_OBJECT CFbsFont CFbsFont1
COMMAND CFbsTypefaceStore1 NewL
COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-GetNearestFontToDesignHeightInPixels_command001
COMMAND wingc UseFont GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-UseFont_command002
COMMAND wingc DrawText GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-DrawText_command003
COMMAND wingc DiscardFont
COMMAND CFbsTypefaceStore1 ~
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0117
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0118
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0118
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the character justification.
//! Uses API elements: SetCharJustification()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Set required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Set window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Set auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets character justification by using SetCharJustification() and return KErrNone if successed.
//! 13. Sets the pen colour to red using SetPenColor() and return KErrNone if successed.
//! 14. Sets the context's font to current graphic context by using UseFont() and return KErrNone if successed.
//! 15. Draws the text with defined font on graphic context screen by using DrawText() and return KErrNone if successed.
//! 16. Discards the font and frees up the memory used by using DiscardFont() and return KErrNone if successed.
//! 17. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 18. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults The text with defined font and color was redraw on the graphic context screen with character justification successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetCharJustification GRAPHICS-WSERV-WindowGc-PublicApi-0120-0001-SetCharJustification_command002
COMMAND wingc SetPenColor GRAPHICS-WSERV-WindowGc-PublicApi-0101-0001-SetPenColor_command002
CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1
CREATE_OBJECT CFbsFont CFbsFont1
COMMAND CFbsTypefaceStore1 NewL
COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-GetNearestFontToDesignHeightInPixels_command001
COMMAND wingc UseFont GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-UseFont_command002
COMMAND wingc DrawText GRAPHICS-WSERV-WindowGc-PublicApi-0118-0001-DrawText_command003
COMMAND wingc DiscardFont
COMMAND CFbsTypefaceStore1 ~
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0118
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0119
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0119
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Draws vertical text in the specified direction.
//! Uses API elements: UseFont(), DrawTextVertical() and DiscardFont()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Set required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Set window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Set auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 13. Sets the context's font to current graphic context by using UseFont() and return KErrNone if successed.
//! 14. Draws vertical text in the specified direction and defined font to graphic context by using DrawText() and return KErrNone if successed.
//! 15. Discards the font and frees up the memory used by using DiscardFont() and return KErrNone if successed.
//! 17. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 18. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults The text with defined font and color was redraw on the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1
CREATE_OBJECT CFbsFont CFbsFont1
COMMAND CFbsTypefaceStore1 NewL
COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-GetNearestFontToDesignHeightInPixels_command001
COMMAND wingc UseFont GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-UseFont_command002
COMMAND wingc DrawTextVertical GRAPHICS-WSERV-WindowGc-PublicApi-0121-0001-DrawTextVertical_command003
COMMAND wingc DiscardFont
COMMAND CFbsTypefaceStore1 ~
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0119
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0120
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0120
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Draws text vertically in the specified direction, within a box of the specified size.
//! Uses API elements: UseFont(), DrawTextVertical() and DiscardFont()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Set required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Set window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Set auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 13. Sets the context's font to current graphic context by using UseFont() and return KErrNone if successed.
//! 14. Draws text vertically in the specified direction, within a box of the specified size and defined font to graphic context by using DrawText() and return KErrNone if successed.
//! 15. Discards the font and frees up the memory used by using DiscardFont() and return KErrNone if successed.
//! 17. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 18. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults The text with defined font and color was redraw on the graphic context screen successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1
CREATE_OBJECT CFbsFont CFbsFont1
COMMAND CFbsTypefaceStore1 NewL
COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-GetNearestFontToDesignHeightInPixels_command001
COMMAND wingc UseFont GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-UseFont_command002
COMMAND wingc DrawTextVertical GRAPHICS-WSERV-WindowGc-PublicApi-0122-0001-DrawTextVertical_command003
COMMAND wingc DiscardFont
COMMAND CFbsTypefaceStore1 ~
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0120
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0121
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0121
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the underline style for all subsequently drawn text.
//! Uses API elements: UseFont(), DrawText(), SetUnderlineStyle() and DiscardFont()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Set required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Set window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Set auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the underline style for all subsequently drawn text and return KErrNone if successed.
//! 13. Sets the pen colour to red using SetPenColor() and return KErrNone if successed.
//! 14. Sets the context's font to current graphic context by using UseFont() and return KErrNone if successed.
//! 15. Draws the text with defined font on graphic context screen by using DrawText() and return KErrNone if successed.
//! 16. Discards the font and frees up the memory used by using DiscardFont() and return KErrNone if successed.
//! 17. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 18. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults The text with defined font and color was redraw on the graphic context screen with character justification successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetUnderlineStyle GRAPHICS-WSERV-WindowGc-PublicApi-0123-0001-SetUnderlineStyle_command002
COMMAND wingc SetPenColor GRAPHICS-WSERV-WindowGc-PublicApi-0101-0001-SetPenColor_command002
CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1
CREATE_OBJECT CFbsFont CFbsFont1
COMMAND CFbsTypefaceStore1 NewL
COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-GetNearestFontToDesignHeightInPixels_command001
COMMAND wingc UseFont GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-UseFont_command002
COMMAND wingc DrawText GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-DrawText_command003
COMMAND wingc DiscardFont
COMMAND CFbsTypefaceStore1 ~
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0121
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0122
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-0122
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 28/12/2006
//! @SYMTestCaseDesc Sets the strikethrough style for all subsequently drawn text.
//! Uses API elements: UseFont(), DrawText(), SetStrikethroughStyle() and DiscardFont()
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context uisng CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Set required window display mode to EColor4K using SetRequiredDisplayMode() and return KErrNone if successed.
//! 7. Set window's background color to yellow using SetBackgroundColor() and return KErrNone if successed.
//! 8. Activate the RWindow using Activate() and return KErrNone if successed.
//! 9. Set auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 10. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 11. Begin redraw the graphic context using BeginRedraw() and return KErrNone if successed.
//! 12. Sets the strikethrough style for all subsequently drawn text and return KErrNone if successed.
//! 13. Sets the pen colour to red using SetPenColor() and return KErrNone if successed.
//! 14. Sets the context's font to current graphic context by using UseFont() and return KErrNone if successed.
//! 15. Draws the text with defined font on graphic context screen by using DrawText() and return KErrNone if successed.
//! 16. Discards the font and frees up the memory used by using DiscardFont() and return KErrNone if successed.
//! 17. Deactive the CWindowGc using Deactivate() and return KErrNone if successed.
//! 18. End redraw the graphic context using EndRedraw() and return KErrNone if successed.
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults The text with defined font and color was redraw on the graphic context screen with character justification successfully.
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND win SetRequiredDisplayMode GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetRequiredDisplayMode_command013
COMMAND win SetBackgroundColor GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetBackgroundColor_command014
COMMAND win Activate
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND win BeginRedraw
COMMAND wingc SetStrikethroughStyle GRAPHICS-WSERV-WindowGc-PublicApi-0124-0001-SetStrikethroughStyle_command002
COMMAND wingc SetPenColor GRAPHICS-WSERV-WindowGc-PublicApi-0101-0001-SetPenColor_command002
CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1
CREATE_OBJECT CFbsFont CFbsFont1
COMMAND CFbsTypefaceStore1 NewL
COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-GetNearestFontToDesignHeightInPixels_command001
COMMAND wingc UseFont GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-UseFont_command002
COMMAND wingc DrawText GRAPHICS-WSERV-WindowGc-PublicApi-0118-0001-DrawText_command003
COMMAND wingc DiscardFont
COMMAND CFbsTypefaceStore1 ~
COMMAND wingc Deactivate
COMMAND win EndRedraw
DELAY 500000
COMMAND wingc ~
COMMAND win Close
COMMAND wingrp Close
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-0122
// ****************************************************************************
// Negative testcases of CWindowGc
// ****************************************************************************
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1002
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1002
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 04/10/2007
//! @SYMTestCaseDesc Activate(RDrawableWindow &aDevice): Execute Activate() on a CWindowGc that already activated
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! 2. Execute Activate() on the CWindowGc to the RWindow
//! 3. Execute Activate() on the CWindowGc to the RWindow again and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=10 (Attempted to activate an already active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-1002-0001-Activate_command001
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-1002-0001-Activate_command001
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=10
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1002
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1003
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1003
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 04/10/2007
//! @SYMTestCaseDesc Activate(RDrawableWindow &aDevice): Execute Activate() a CWindowGc to a invalid RDrawableWindow
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindowGroup to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 2. Execute Activate() on the CWindowGc to invalid RDrawableWindow (the RWindowGroup object) and see if it meets expected panic code
//! 3. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=6 (Invalid window handle)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-1003-0001-Activate_command001
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=6
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1003
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1004
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1004
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 04/10/2007
//! @SYMTestCaseDesc Deactivate(): Execute Deactivate() a CWindowGc before Activate() it
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 1.4 New and construct a RWindowGroup within the RWsSession
//! 1.5 New and construct a RWindow as the child of the RWindowGroup
//! 2. Execute Deactivate() a CWindowGc before Activate() it
//! 3. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults Deactivate() a CWindowGc before Activate() it would not generate error
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command012
COMMAND wingc Deactivate
COMMAND win Close
COMMAND wingrp Close
COMMAND wingc ~
COMMAND scrdev ~
COMMAND ws Close
END_TEST_BLOCK
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1004
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1005
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1005
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 21/11/2007
//! @SYMTestCaseDesc SetClippingRect(const TRect &aRect): execute SetClippingRect in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute SetClippingRect() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc SetClippingRect GRAPHICS-WSERV-WindowGc-PublicApi-0009-0001-SetClippingRect_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1005
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1006
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1006
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 21/11/2007
//! @SYMTestCaseDesc CancelClippingRect(): execute CancelClippingRect in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute CancelClippingRect() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc CancelClippingRect
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1006
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1007
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1007
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 22/11/2007
//! @SYMTestCaseDesc MoveTo(const TPoint &aPoint): execute MoveTo in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute MoveTo() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc MoveTo GRAPHICS-WSERV-WindowGc-PublicApi-0026-0001-MoveTo_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1007
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1008
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1008
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 22/11/2007
//! @SYMTestCaseDesc MoveBy(const TPoint &aPoint): execute MoveBy in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute MoveBy() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc MoveBy GRAPHICS-WSERV-WindowGc-PublicApi-0027-0001-MoveBy_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1008
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1009
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1009
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 02/11/2007
//! @SYMTestCaseDesc Plot(const TPoint &aPoint): execute Plot in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute Plot() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc Plot GRAPHICS-WSERV-WindowGc-PublicApi-0028-0001-Plot_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1009
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1010
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1010
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 05/11/2007
//! @SYMTestCaseDesc DrawArc(const TRect &aRect, const TPoint &aStart, const TPoint &aEnd): execute DrawArc in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute DrawArc() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc DrawArc GRAPHICS-WSERV-WindowGc-PublicApi-0029-0001-DrawArc_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1010
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1011
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1011
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 05/11/2007
//! @SYMTestCaseDesc DrawLine(const TPoint &aPoint1, const TPoint &aPoint2): execute DrawLine in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute DrawLine() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc DrawLine GRAPHICS-WSERV-WindowGc-PublicApi-0030-0001-DrawLine_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1011
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1012
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1012
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 06/11/2007
//! @SYMTestCaseDesc DrawLineTo(const TPoint &aPoint): execute DrawLineTo in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute DrawLineTo() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc DrawLineTo GRAPHICS-WSERV-WindowGc-PublicApi-0031-0001-DrawLineTo_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1012
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1013
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1013
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 06/11/2007
//! @SYMTestCaseDesc DrawLineBy(const TPoint &aPoint): execute DrawLineBy in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute DrawLineBy() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc DrawLineBy GRAPHICS-WSERV-WindowGc-PublicApi-0032-0001-DrawLineBy_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1013
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1014
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1014
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 07/11/2007
//! @SYMTestCaseDesc DrawPolyLine(const CArrayFix< TPoint > *aPointList): execute DrawPolyLine in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute DrawPolyLine() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc DrawPolyLine GRAPHICS-WSERV-WindowGc-PublicApi-0033-0001-DrawPolyLine_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1014
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1015
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1015
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 07/11/2007
//! @SYMTestCaseDesc DrawPolyLine(const TPoint *aPointList, TInt aNumPoints): execute DrawPolyLine in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute DrawLine() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc DrawPolyLine GRAPHICS-WSERV-WindowGc-PublicApi-0034-0001-DrawPolyLine_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1015
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1016
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1016
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 08/11/2007
//! @SYMTestCaseDesc DrawPie(const TRect &aRect, const TPoint &aStart, const TPoint &aEnd): execute DrawPie in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute DrawPie() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc DrawPie GRAPHICS-WSERV-WindowGc-PublicApi-0035-0001-DrawPie_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1016
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1017
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1017
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 08/11/2007
//! @SYMTestCaseDesc DrawEllipse(const TRect &aRect): execute DrawEllipse in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute DrawEllipse() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc DrawEllipse GRAPHICS-WSERV-WindowGc-PublicApi-0036-0001-DrawEllipse_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1017
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1018
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1018
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 09/11/2007
//! @SYMTestCaseDesc DrawRect(const TRect &aRect): execute DrawRect in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute DrawRect() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc DrawRect GRAPHICS-WSERV-WindowGc-PublicApi-0037-0001-DrawRect_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1018
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1019
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1019
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 09/11/2007
//! @SYMTestCaseDesc DrawRoundRect(const TRect &aRect, const TSize &aEllipse): execute DrawRoundRect in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute DrawLine() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc DrawRoundRect GRAPHICS-WSERV-WindowGc-PublicApi-0038-0001-DrawRoundRect_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1019
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1020
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1020
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 12/11/2007
//! @SYMTestCaseDesc DrawPolygon(const CArrayFix< TPoint > *aPointList, TFillRule aFillRule=EAlternate): execute DrawPolygon in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute DrawPolygon() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc DrawPolygon GRAPHICS-WSERV-WindowGc-PublicApi-0039-0001-DrawPolygon_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1020
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1021
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1021
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 12/11/2007
//! @SYMTestCaseDesc DrawPolygon(const TPoint *aPointList, TInt aNumPoints, TFillRule aFillRule=EAlternate): execute DrawPolygon in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute DrawPolygon() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc DrawPolygon GRAPHICS-WSERV-WindowGc-PublicApi-0040-0001-DrawPolygon_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1021
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1022
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1022
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 13/11/2007
//! @SYMTestCaseDesc DrawBitmap(const TPoint &aTopLeft, const CFbsBitmap *aDevice): execute DrawBitmap in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. New and Load CFbsBitmap as drawing bitmap
//! 3. Execute DrawBitmap() before Activate() the CWindowGc
//! 4. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 5. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
CREATE_OBJECT CFbsBitmap fbsbmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0041-0001-Load_command002
COMMAND wingc DrawBitmap GRAPHICS-WSERV-WindowGc-PublicApi-0041-0001-DrawBitmap_command010
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1022
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1023
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1023
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 13/11/2007
//! @SYMTestCaseDesc DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aDevice): execute DrawBitmap in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. New and Load CFbsBitmap as drawing bitmap
//! 3. Execute DrawBitmap() before Activate() the CWindowGc
//! 4. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 5. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
CREATE_OBJECT CFbsBitmap fbsbmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0042-0001-Load_command002
COMMAND wingc DrawBitmap GRAPHICS-WSERV-WindowGc-PublicApi-0042-0001-DrawBitmap_command009
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1023
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1024
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1024
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 13/11/2007
//! @SYMTestCaseDesc DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aDevice, const TRect &aSourceRect): execute DrawBitmap in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. New and Load CFbsBitmap as drawing bitmap
//! 3. Execute DrawBitmap() before Activate() the CWindowGc
//! 4. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 5. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
CREATE_OBJECT CFbsBitmap fbsbmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0043-0001-Load_command002
COMMAND wingc DrawBitmap GRAPHICS-WSERV-WindowGc-PublicApi-0043-0001-DrawBitmap_command009
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1024
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1025
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1025
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 14/11/2007
//! @SYMTestCaseDesc DrawBitmapMasked(const TRect &aDestRect, const CFbsBitmap *aBitmap, const TRect &aSourceRect, const CFbsBitmap *aMaskBitmap, TBool aInvertMask): execute DrawBitmapMasked in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. New and Load CFbsBitmap as drawing bitmap and mask bitmap
//! 3. Execute DrawBitmapMasked() before Activate() the CWindowGc
//! 4. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 5. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
CREATE_OBJECT CFbsBitmap fbsbmp
CREATE_OBJECT CFbsBitmap fbsmaskbmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0044-0001-Load_command002
COMMAND fbsmaskbmp new
COMMAND fbsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0044-0001-Load_command010
COMMAND wingc DrawBitmapMasked GRAPHICS-WSERV-WindowGc-PublicApi-0044-0001-DrawBitmapMasked_command015
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1025
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1026
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1026
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 14/11/2007
//! @SYMTestCaseDesc DrawBitmapMasked(const TRect &aDestRect, const CWsBitmap *aBitmap, const TRect &aSourceRect, const CWsBitmap *aMaskBitmap, TBool aInvertMask): execute DrawBitmap in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. New and Load CWsBitmap as drawing bitmap and mask bitmap
//! 3. Execute DrawBitmapMasked() before Activate() the CWindowGc
//! 4. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 5. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
CREATE_OBJECT CWsBitmap wsbmp
CREATE_OBJECT CWsBitmap wsmaskbmp
COMMAND wsbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0045-0001-new_command001
COMMAND wsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0045-0001-Load_command002
COMMAND wsmaskbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0045-0001-new_command004
COMMAND wsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0045-0001-Load_command005
COMMAND wingc DrawBitmapMasked GRAPHICS-WSERV-WindowGc-PublicApi-0045-0001-DrawBitmapMasked_command009
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1026
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1027
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1027
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 23/11/2007
//! @SYMTestCaseDesc Clear(): execute Clear in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute Clear() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc Clear
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1027
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1028
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1028
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 23/11/2007
//! @SYMTestCaseDesc Clear(const TRect &aRect): execute Clear in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute Clear() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc Clear GRAPHICS-WSERV-WindowGc-PublicApi-0049-0001-Clear_command003
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1028
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1029
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1029
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 23/11/2007
//! @SYMTestCaseDesc CopyRect(const TPoint &anOffset, const TRect &aRect): execute CopyRect in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute CopyRect() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc CopyRect GRAPHICS-WSERV-WindowGc-PublicApi-0050-0001-CopyRect_command007
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1029
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1030
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1030
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 15/11/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aPos, const CFbsBitmap *aBitmap): execute BitBlt in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. New and Load CFbsBitmap as drawing bitmap
//! 3. Execute BitBlt() before Activate() the CWindowGc
//! 4. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 5. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
CREATE_OBJECT CFbsBitmap fbsbmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0051-0001-Load_command002
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0051-0001-BitBlt_command009
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1030
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1031
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1031
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 15/11/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aDestination, const CFbsBitmap *aBitmap, const TRect &aSource): execute BitBlt in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. New and Load CFbsBitmap as drawing bitmap
//! 3. Execute BitBlt() before Activate() the CWindowGc
//! 4. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 5. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
CREATE_OBJECT CFbsBitmap fbsbmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0052-0001-Load_command002
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0052-0001-BitBlt_command009
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1031
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1032
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1032
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 16/11/2007
//! @SYMTestCaseDesc BitBltMasked(const TPoint &aPoint, const CFbsBitmap *aBitmap, const TRect &aSourceRect, const CFbsBitmap *aMaskBitmap, TBool aInvertMask): execute BitBltMasked in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. New and Load CFbsBitmap as drawing bitmap and mask bitmap
//! 3. Execute BitBltMasked() before Activate() the CWindowGc
//! 4. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 5. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
CREATE_OBJECT CFbsBitmap fbsbmp
CREATE_OBJECT CFbsBitmap fbsmaskbmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0053-0001-Load_command002
COMMAND fbsmaskbmp new
COMMAND fbsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0053-0001-Load_command008
COMMAND wingc BitBltMasked GRAPHICS-WSERV-WindowGc-PublicApi-0053-0001-BitBltMasked_command012
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1032
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1033
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1033
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 15/11/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aPoint, const CWsBitmap *aBitmap): execute BitBlt in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. New and Load CWsBitmap as drawing bitmap
//! 3. Execute BitBlt() before Activate() the CWindowGc
//! 4. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 5. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
CREATE_OBJECT CWsBitmap wsbmp
COMMAND wsbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0054-0001-new_command001
COMMAND wsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0054-0001-Load_command002
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0054-0001-BitBlt_command006
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1033
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1034
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1034
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 15/11/2007
//! @SYMTestCaseDesc BitBlt(const TPoint &aDestination, const CWsBitmap *aBitmap, const TRect &aSource): execute BitBlt in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. New and Load CWsBitmap as drawing bitmap
//! 3. Execute BitBlt() before Activate() the CWindowGc
//! 4. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 5. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
CREATE_OBJECT CWsBitmap wsbmp
COMMAND wsbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0055-0001-new_command001
COMMAND wsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0055-0001-Load_command002
COMMAND wingc BitBlt GRAPHICS-WSERV-WindowGc-PublicApi-0055-0001-BitBlt_command006
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1034
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1035
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1035
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 16/11/2007
//! @SYMTestCaseDesc BitBltMasked(const TPoint &aPoint, const CWsBitmap *aBitmap, const TRect &aSourceRect, const CWsBitmap *aMaskBitmap, TBool aInvertMask): execute BitBltMasked in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. New and Load CWsBitmap as drawing bitmap and mask bitmap
//! 3. Execute BitBltMasked() before Activate() the CWindowGc
//! 4. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 5. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
CREATE_OBJECT CWsBitmap wsbmp
CREATE_OBJECT CWsBitmap wsmaskbmp
COMMAND wsbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-new_command001
COMMAND wsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-Load_command002
COMMAND wsmaskbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-new_command004
COMMAND wsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-Load_command005
COMMAND wingc BitBltMasked GRAPHICS-WSERV-WindowGc-PublicApi-0056-0001-BitBltMasked_command009
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1035
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1036
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1036
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 26/11/2007
//! @SYMTestCaseDesc SetClippingRegion(const TRegion &aRegion): execute SetClippingRegion in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute SetClippingRegion() before Activate() the CWindowGc
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc SetClippingRegion GRAPHICS-WSERV-WindowGc-PublicApi-0061-0001-SetClippingRegion_command003
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1036
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1037
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1037
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 26/11/2007
//! @SYMTestCaseDesc CancelClippingRegion(): execute CancelClippingRegion in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. Execute CancelClippingRegion() before Activate() the CWindowGc
//! 3. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 4. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
COMMAND wingc CancelClippingRegion
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1037
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1038
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1038
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 19/11/2007
//! @SYMTestCaseDesc AlphaBlendBitmaps(const TPoint &aDestPt, const CFbsBitmap *aSrcBmp, const TRect &aSrcRect, const CFbsBitmap *aAlphaBmp, const TPoint &aAlphaPt): execute AlphaBlendBitmaps in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. New and Load CFbsBitmap as source bitmap and alpha bitmap
//! 3. Execute AlphaBlendBitmaps() before Activate() the CWindowGc
//! 4. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 5. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
CREATE_OBJECT CFbsBitmap fbsbmp
CREATE_OBJECT CFbsBitmap fbsalphabmp
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0066-0001-Load_command002
COMMAND fbsalphabmp new
COMMAND fbsalphabmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0066-0001-Load_command007
COMMAND wingc AlphaBlendBitmaps GRAPHICS-WSERV-WindowGc-PublicApi-0066-0001-AlphaBlendBitmaps_command013
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1038
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1039
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1039
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 19/11/2007
//! @SYMTestCaseDesc AlphaBlendBitmaps(const TPoint &aDestPt, const CWsBitmap *aSrcBmp, const TRect &aSrcRect, const CWsBitmap *aAlphaBmp, const TPoint &aAlphaPt): execute AlphaBlendBitmaps in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. New and Load CWsBitmap as source bitmap and alpha bitmap
//! 3. Execute AlphaBlendBitmaps() before Activate() the CWindowGc
//! 4. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 5. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
CREATE_OBJECT CWsBitmap wsbmp
CREATE_OBJECT CWsBitmap wsalphabmp
COMMAND wsbmp new GRAPHICS-WSERV-WindowGc-PublicApi-0067-0001-new_command001
COMMAND wsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0067-0001-Load_command002
COMMAND wsalphabmp new GRAPHICS-WSERV-WindowGc-PublicApi-0067-0001-new_command004
COMMAND wsalphabmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0067-0001-Load_command005
COMMAND wingc AlphaBlendBitmaps GRAPHICS-WSERV-WindowGc-PublicApi-0067-0001-AlphaBlendBitmaps_command009
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1039
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1040
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1040
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/11/2007
//! @SYMTestCaseDesc DrawWsGraphic(const TWsGraphicId &aId, const TRect &aDestRect): execute DrawWsGraphic in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. New and Load a source CFbsBitmap and a mask CFbsBitmap
//! and use them to create a non-transcient artwork CWsGraphicBitmap
//! 3. Execute DrawWsGraphic() before Activate() the CWindowGc
//! 4. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 5. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
CREATE_OBJECT CFbsBitmap fbsbmp
CREATE_OBJECT CFbsBitmap fbsmaskbmp
CREATE_OBJECT CWsGraphicBitmap wsgraph
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0068-0001-Load_command002
COMMAND fbsmaskbmp new
COMMAND fbsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0068-0001-Load_command005
COMMAND wsgraph NewL GRAPHICS-WSERV-WindowGc-PublicApi-0068-0001-NewL_command007
COMMAND wingc DrawWsGraphic GRAPHICS-WSERV-WindowGc-PublicApi-0068-0001-DrawWsGraphic_command011
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1040
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1041
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1041
//! @SYMAPI CWindowGc
//! @SYMAuthor Victor Liu
//! @SYMCreationDate 20/11/2007
//! @SYMTestCaseDesc DrawWsGraphic(const TWsGraphicId &aId, const TRect &aDestRect, const TDesC8 &aData): execute DrawWsGraphic in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Setup a CWindowGc and RWindow to test
//! 1.1 New and connect a RWsSession
//! 1.2 New and construct a CWsScreenDevice within the RWsSession
//! 1.3 Create a CWindowGc within the CWsScreenDevice (use CreateContext)
//! 2. New and Load a source CFbsBitmap and a mask CFbsBitmap
//! and use them to create a non-transcient artwork CWsGraphicBitmap
//! 3. New RWsGraphicMsgBuf to be attached to CWindowGc::DrawWsGraphic
//! 4. Execute DrawWsGraphic() before Activate() the CWindowGc
//! 5. Execute Flush() on the RWsSession and see if it meets expected panic code
//! 6. Destruct and close all objects used
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-Setup-0002-0001-new_command004
COMMAND scrdev Construct GRAPHICS-WSERV-WindowGc-Setup-0002-0001-Construct_command005
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-Setup-0002-0001-CreateContext_command006
CREATE_OBJECT CFbsBitmap fbsbmp
CREATE_OBJECT CFbsBitmap fbsmaskbmp
CREATE_OBJECT CWsGraphicBitmap wsgraph
CREATE_OBJECT RWsGraphicMsgBuf wsgraphmsg
COMMAND fbsbmp new
COMMAND fbsbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0069-0001-Load_command002
COMMAND fbsmaskbmp new
COMMAND fbsmaskbmp Load GRAPHICS-WSERV-WindowGc-PublicApi-0069-0001-Load_command005
COMMAND wsgraph NewL GRAPHICS-WSERV-WindowGc-PublicApi-0069-0001-NewL_command007
COMMAND wsgraphmsg new
COMMAND wingc DrawWsGraphic GRAPHICS-WSERV-WindowGc-PublicApi-0069-0001-DrawWsGraphic_command013
COMMAND ws Flush
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1041
//! -----------------------------------------------------------------------------------------
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1101
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1101
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 05/11/2007
//! @SYMTestCaseDesc SetPenColor(const TRgb &aColor): execute SetPenColor in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets the pen colour to red using SetPenColor() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetPenColor GRAPHICS-WSERV-WindowGc-PublicApi-0101-0001-SetPenColor_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1101
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1102
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1102
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 05/11/2007
//! @SYMTestCaseDesc SetPenStyle(TPenStyle aPenStyle): execute SetPenStyle in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets the line drawing style to EDotDotDashPen for the pen using SetPenStyle() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetPenStyle GRAPHICS-WSERV-WindowGc-PublicApi-0102-0001-SetPenStyle_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1102
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1103
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1103
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 05/11/2007
//! @SYMTestCaseDesc SetPenSize(const TSize &aSize): execute SetPenSize in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets the line drawing size to 20 width, 40 height for the pen using SetPenSize() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetPenSize GRAPHICS-WSERV-WindowGc-PublicApi-0103-0001-SetPenSize_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1103
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1104
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1104
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 06/11/2007
//! @SYMTestCaseDesc SetBrushColor(const TRgb &aColor);: execute SetBrushColor in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets the brush colour using SetBrushColor() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetBrushColor GRAPHICS-WSERV-WindowGc-PublicApi-0104-0001-SetBrushColor_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1104
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1105
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1105
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 06/11/2007
//! @SYMTestCaseDesc SetBrushStyle(TBrushStyle aBrushStyle): execute SetBrushStyle in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets the line drawing style to ESolidBrush for the brush using SetBrushStyle() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetBrushStyle GRAPHICS-WSERV-WindowGc-PublicApi-0105-0001-SetBrushStyle_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1105
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1106
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1106
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 07/11/2007
//! @SYMTestCaseDesc SetBrushOrigin(const TPoint &aOrigin): execute SetBrushOrigin in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets the brush pattern origin using SetBrushOrigin() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetBrushOrigin GRAPHICS-WSERV-WindowGc-PublicApi-0106-0001-SetBrushOrigin_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1106
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1107
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1107
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 07/11/2007
//! @SYMTestCaseDesc SetOrigin(const TPoint &aPoint): execute SetOrigin in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets the position of the co-ordinate origin using SetOrigin() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetOrigin GRAPHICS-WSERV-WindowGc-PublicApi-0107-0001-SetOrigin_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1107
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1108
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1108
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 08/11/2007
//! @SYMTestCaseDesc SetDrawMode(TDrawMode aDrawingMode): execute SetDrawMode in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets the drawing mode to EDrawModeXOR using SetDrawMode() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetDrawMode GRAPHICS-WSERV-WindowGc-PublicApi-0108-0001-SetDrawMode_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1108
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1109
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1109
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 08/11/2007
//! @SYMTestCaseDesc SetOpaque(TBool aDrawOpaque): execute SetOpaque in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets an opaque flag on the window and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetOpaque GRAPHICS-WSERV-WindowGc-PublicApi-0109-0001-SetOpaque_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1109
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1110
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1110
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 09/11/2007
//! @SYMTestCaseDesc SetFaded(TBool aFaded): execute SetFaded in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets the graphics context to faded using SetFaded() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetFaded GRAPHICS-WSERV-WindowGc-PublicApi-0110-0001-SetFaded_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1110
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1111
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1111
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 09/11/2007
//! @SYMTestCaseDesc SetFadingParameters(TUint8 aBlackMap, TUint8 aWhiteMap): execute SetFadingParameters in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets the fading parameters using SetFadingParameters() with BlackMap to 100, WhiteMap to 100 and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetFadingParameters GRAPHICS-WSERV-WindowGc-PublicApi-0111-0001-SetFadingParameters_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1111
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1112
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1112
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 12/11/2007
//! @SYMTestCaseDesc SetDitherOrigin(const TPoint &aPoint): execute SetDitherOrigin in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets the origin used for colour dithering using SetDitherOrigin() with position (250,25) and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetDitherOrigin GRAPHICS-WSERV-WindowGc-PublicApi-0112-0001-SetDitherOrigin_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1112
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1113
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1113
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 12/11/2007
//! @SYMTestCaseDesc MapColors(const TRect &aRect, const TRgb *aColors, TInt aNumPairs, TBool aMapForwards): execute MapColors in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Re-maps pixel colours within a rectangle using MapColors() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc MapColors GRAPHICS-WSERV-WindowGc-PublicApi-0113-0001-MapColors_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1113
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1114
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1114
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 13/11/2007
//! @SYMTestCaseDesc UseBrushPattern(const CFbsBitmap *aDevice): execute UseBrushPattern in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets the brush pattern to the specified bitmap by using UseBrushPattern() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
CREATE_OBJECT CFbsBitmap fbsBitmap
COMMAND fbsBitmap new
COMMAND fbsBitmap Load GRAPHICS-WSERV-WindowGc-PublicApi-0115-0001-Load_command003
COMMAND wingc UseBrushPattern GRAPHICS-WSERV-WindowGc-PublicApi-0115-0001-UseBrushPattern_command005
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1114
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1115
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1115
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 13/11/2007
//! @SYMTestCaseDesc DiscardBrushPattern(): execute DiscardBrushPattern in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Discards a non-built-in brush pattern by using UseBrushPattern() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc DiscardBrushPattern
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1115
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1116
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1116
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 14/11/2007
//! @SYMTestCaseDesc UseFont(const CFont *aFont): execute UseFont in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. NewL() a CFbsTypefaceStore object and using GetNearestFontToDesignHeightInPixels() to get the font which is the nearest to the given font specification
//! 6. Sets this context's font by using UseFont() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
CREATE_OBJECT CFbsTypefaceStore CFbsTypefaceStore1
CREATE_OBJECT CFbsFont CFbsFont1
COMMAND CFbsTypefaceStore1 NewL
COMMAND CFbsTypefaceStore1 GetNearestFontToDesignHeightInPixels GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-GetNearestFontToDesignHeightInPixels_command001
COMMAND wingc UseFont GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-UseFont_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1116
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1117
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1117
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 19/11/2007
//! @SYMTestCaseDesc DrawText(const TDesC &aBuf, const TPoint &aPos): execute DrawText in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Draws horizontal text with no surrounding box by using DrawTextVertical() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc DrawText GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-DrawText_command003
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1117
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1118
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1118
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 19/11/2007
//! @SYMTestCaseDesc DrawText(const TDesC &aBuf, const TRect &aBox, TInt aBaselineOffset, TTextAlign aHoriz=ELeft, TInt aLeftMrg=0): execute DrawText in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Draws horizontal text within a cleared box by using DrawTextVertical() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc DrawText GRAPHICS-WSERV-WindowGc-PublicApi-0118-0001-DrawText_command003
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1118
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1119
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1119
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 15/11/2007
//! @SYMTestCaseDesc SetWordJustification(TInt aExcessWidth, TInt aNumGaps): execute SetWordJustification in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets word justification by using SetWordJustification() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetWordJustification GRAPHICS-WSERV-WindowGc-PublicApi-0119-0001-SetWordJustification_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1119
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1120
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1120
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 15/11/2007
//! @SYMTestCaseDesc SetCharJustification(TInt aExcessWidth, TInt aNumChars): execute SetCharJustification in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets the character justification by using SetCharJustification() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetCharJustification GRAPHICS-WSERV-WindowGc-PublicApi-0120-0001-SetCharJustification_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1120
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1121
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1121
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 20/11/2007
//! @SYMTestCaseDesc DrawTextVertical(const TDesC &aText, const TPoint &aPos, TBool aUp): execute DrawTextVertical in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Draws vertical text in the specified direction by using DrawTextVertical() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc DrawTextVertical GRAPHICS-WSERV-WindowGc-PublicApi-0121-0001-DrawTextVertical_command003
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1121
//!START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1122
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1122
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 20/11/2007
//! @SYMTestCaseDesc DrawTextVertical(const TDesC &aText, const TRect &aBox, TInt aBaselineOffset, TBool aUp, TTextAlign aVert=ELeft, TInt aMargin=0): execute DrawTextVertical in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Draws text vertically in the specified direction, within a box of the specified size by using DrawTextVertical() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic KERN-EXEC code=3
//! @SYMTestType CIT
//! START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
//! CREATE_OBJECT RWsSession ws
//! CREATE_OBJECT CWsScreenDevice scrdev
//! CREATE_OBJECT CWindowGc wingc
//! COMMAND ws new
//! COMMAND ws Connect
//! COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
//! COMMAND scrdev Construct
//! COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
//! COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
//! COMMAND wingc DrawTextVertical GRAPHICS-WSERV-WindowGc-PublicApi-0122-0001-DrawTextVertical_command003
//! END_TEST_BLOCK !PanicString=KERN-EXEC !PanicCode=3
//! RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
//!END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1122
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1123
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1123
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 16/11/2007
//! @SYMTestCaseDesc SetUnderlineStyle(TFontUnderline aUnderlineStyle): execute SetUnderlineStyle in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets the underline style for all subsequently drawn text by using SetUnderlineStyle() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetUnderlineStyle GRAPHICS-WSERV-WindowGc-PublicApi-0123-0001-SetUnderlineStyle_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1123
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1124
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1124
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 16/11/2007
//! @SYMTestCaseDesc SetStrikethroughStyle(TFontStrikethrough aStrikethroughStyle): execute SetStrikethroughStyle in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Sets the strikethrough style for all subsequently drawn text by using SetStrikethroughStyle() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc SetStrikethroughStyle GRAPHICS-WSERV-WindowGc-PublicApi-0124-0001-SetStrikethroughStyle_command002
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1124
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1125
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1125
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 14/11/2007
//! @SYMTestCaseDesc DiscardFont(): execute DiscardFont in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Discards a font by using DiscardFont() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc DiscardFont
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1125
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1126
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1126
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 14/11/2007
//! @SYMTestCaseDesc Reset(): execute Reset in a non-active graphics context
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 5. Resets the graphics context to its default settings by using Reset() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=9 (Attempted to use a non-active graphics context)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc Reset
END_TEST_BLOCK !PanicString=WSERV !PanicCode=9
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1126
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1127
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1127
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 21/11/2007
//! @SYMTestCaseDesc MapColors(const TRect &aRect, const TRgb *aColors, TInt aNumPairs, TBool aMapForwards): execute MapColors with NumPairs greater than 16
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 7. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 8. MapColors with NumPairs greater than 16 (e.g. 18) and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic W32 code=4 (Raised by CWindowGc::MapColors() when its aNumPairs argument has a value greater than 16)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc MapColors GRAPHICS-WSERV-WindowGc-PublicApi-1126-0001-MapColors_command002
END_TEST_BLOCK !PanicString=W32 !PanicCode=4
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1127
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1128
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1128
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 22/11/2007
//! @SYMTestCaseDesc DrawText(const TDesC &aBuf, const TPoint &aPos): execute DrawText with no active font
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 7. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 8. Draws horizontal text with no surrounding box by using DrawTextVertical() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=14 (Printing with no active font)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc DrawText GRAPHICS-WSERV-WindowGc-PublicApi-0116-0001-DrawText_command003
END_TEST_BLOCK !PanicString=WSERV !PanicCode=14
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1128
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1129
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1129
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 22/11/2007
//! @SYMTestCaseDesc DrawText(const TDesC &aBuf, const TRect &aBox, TInt aBaselineOffset, TTextAlign aHoriz=ELeft, TInt aLeftMrg=0): execute DrawText with no active font
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 7. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 8. Draws horizontal text within a cleared box by using DrawTextVertical() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=14 (Printing with no active font)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc DrawText GRAPHICS-WSERV-WindowGc-PublicApi-0118-0001-DrawText_command003
END_TEST_BLOCK !PanicString=WSERV !PanicCode=14
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1129
START_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1130
//! @SYMTestCaseID GRAPHICS-WSERV-WindowGc-PublicApi-1130
//! @SYMAPI CWindowGc
//! @SYMAuthor Shirly Kuo
//! @SYMCreationDate 23/11/2007
//! @SYMTestCaseDesc DrawTextVertical(const TDesC &aText, const TPoint &aPos, TBool aUp): execute DrawTextVertical with no active font
//! Uses API elements: RWsSession::Connect, CWsScreenDevice::Construct & CreateContext, CWindowGc::Construct, RWindowGroup::Construct, RWindow::Construct
//! @SYMTestActions 1. Construct and connect to RWsSession using NewL() and Connect() and return KErrNone if successed.
//! 2. Construct and Initialize the CWsScreenDevice using NewL() and Construct() and return KErrNone if successed.
//! 3. Create window graphic context using CreateContext() and return KErrNone if successed.
//! 4. Construct and Initialize the RWindowGroup using NewL(), Construct() and return KErrNone if successed.
//! 5. Construct and Initialize the RWindow using NewL(), Construct() and return KErrNone if successed.
//! 6. Activate the CWindowGc using Activate() and return KErrNone if successed.
//! 7. Sets auto flush the window's messages and events using SetAutoFlush() and return the previous status if successed.
//! 8. Draws vertical text in the specified direction by using DrawTextVertical() and check if it generates expected panic code
//! @SYMTestStatus Implemented
//! @SYMTestPriority Medium
//! @SYMTestExpectedResults get panic WSERV code=14 (Printing with no active font)
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_GraphicsWservAPI \graphics\GRAPHICS-WSERV-WindowGc-PublicApi.ini
CREATE_OBJECT RWsSession ws
CREATE_OBJECT CWsScreenDevice scrdev
CREATE_OBJECT CWindowGc wingc
CREATE_OBJECT RWindowGroup wingrp
CREATE_OBJECT RWindow win
COMMAND ws new
COMMAND ws Connect
COMMAND scrdev new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command004
COMMAND scrdev Construct
COMMAND scrdev CreateContext GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-CreateContext_command006
COMMAND wingrp new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command008
COMMAND wingrp Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command009
COMMAND win new GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-new_command011
COMMAND win Construct GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Construct_command012
COMMAND wingc Activate GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-Activate_command019
COMMAND ws SetAutoFlush GRAPHICS-WSERV-WindowGc-PublicApi-SetupGraphicContext-0001-SetAutoFlush_command017
COMMAND wingc DrawTextVertical GRAPHICS-WSERV-WindowGc-PublicApi-0121-0001-DrawTextVertical_command003
END_TEST_BLOCK !PanicString=WSERV !PanicCode=14
RUN_TEST_STEP 100 T_GraphicsWservAPI utilityClearPanicDlg
END_TESTCASE GRAPHICS-WSERV-WindowGc-PublicApi-1130