os/graphics/windowing/windowserver/nonnga/SERVER/WSANIMGC.CPP
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Interface code for animated DLL's GC
    15 // 
    16 //
    17 
    18 #include <e32std.h>
    19 #include "server.h"
    20 #include "playbackgc.h"
    21 #include "ANIM.H"
    22 #include "wsfont.h"
    23 
    24 CWsAnimGc::CWsAnimGc() : iUserActive(EFalse), iUseDrawingRegion(EFalse)
    25 	{
    26 	__DECLARE_NAME(_S("CWsAnimGc"));
    27 	}
    28 
    29 void CWsAnimGc::SetDrawingRegions(const TRegion *aRegion)
    30 	{
    31 	if (aRegion)
    32 		{
    33 		iDrawingRegion.Copy(*aRegion);
    34 		iDrawingRegion.Offset(iWin->Origin());
    35 		}
    36 	iDrawingRegion.Intersect(*iBaseRegion);
    37 	iDrawingRegion.Tidy();
    38 	iGc->SetClippingRegion(iDrawingRegion);
    39 	iUseDrawingRegion=ETrue;
    40 	}
    41 
    42 void CWsAnimGc::Activate(CWsClientWindow *aWindow, CWsAnim *aWsAnim, const TRegion *aRegion, CFbsBitGc *aGc)
    43 	{
    44 	iOwningWsAnim=aWsAnim;
    45 	if (iWin)
    46 		iOwningWsAnim->Panic();
    47 	iWin=aWindow;
    48 	iBaseRegion=aRegion ? aRegion : &iWin->VisibleRegion();
    49 
    50 	iGc = aGc;
    51 	iUserActive = ETrue;
    52 	Reset();
    53 	}
    54 
    55 void CWsAnimGc::Deactivate()
    56 	{
    57 	if (iUseDrawingRegion)
    58 		{
    59 		iDrawingRegion.Close();
    60 		}
    61 	iUseDrawingRegion=EFalse;
    62 	CloseCurrentFont();
    63 
    64 	iWin=NULL;
    65 	iGc=NULL;
    66 	iUserActive = EFalse;
    67 	}
    68 
    69 TBool CWsAnimGc::IsActive() const
    70 	{
    71 	return (iUserActive || (iGc != NULL));
    72 	}
    73 
    74 void CWsAnimGc::UserActivate(CWsClientWindow *aWindow, CWsAnim *aWsAnim)
    75 	{
    76 	if (iWin)
    77 		{
    78 		UserDeactivate();
    79 		iOwningWsAnim->Panic();
    80 		}
    81 	iOwningWsAnim=aWsAnim;
    82 	iWin=aWindow;
    83 	iUserActive = ETrue;
    84 	}
    85 
    86 void CWsAnimGc::UserDeactivate()
    87 	{
    88 	CloseCurrentFont();
    89 
    90 	if (iWin && iOwningWsAnim)
    91 		{
    92 		TRegionFix<1> animRegion(iOwningWsAnim->BestRect());
    93 		iWin->ScheduleRegionUpdate(&animRegion);
    94 		}
    95 
    96 	iWin = NULL;
    97 	iUserActive = EFalse;
    98 	}
    99 
   100 void CWsAnimGc::AnimDeleted(CWsAnim *aWsAnim)
   101 	{	
   102 	if (iOwningWsAnim==aWsAnim)
   103 		iOwningWsAnim=NULL;
   104 	}
   105 
   106 CGraphicsDevice* CWsAnimGc::Device() const
   107 	{
   108 	if (!iUserActive)
   109 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   110 
   111 	return iGc ? iGc->Device() : NULL;
   112 	}
   113 
   114 void CWsAnimGc::SetClippingRect(const TRect& aRect)
   115 	{
   116 	if (!iUserActive)
   117 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   118 
   119 	if (iGc)
   120 		{
   121 		iClippingRect=aRect;
   122 		iClippingRect.Intersection(TRect(iWin->Size()));
   123 		iGc->SetClippingRect(iClippingRect);
   124 		}
   125 	}
   126 
   127 TInt CWsAnimGc::SetClippingRegion(const TRegion &aRegion)
   128 //This function is virtual and so cannot have an 'L' at the end of it's name
   129 	{
   130 	if (iWin==NULL)
   131 		User::Leave(KErrGeneral);
   132 
   133 	if (iGc)
   134 		SetDrawingRegions(&aRegion);
   135 	return KErrNone;
   136 	}
   137 
   138 void CWsAnimGc::CancelClippingRegion()
   139 	{
   140 	if (!iUserActive)
   141 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   142 
   143 	if (iGc)
   144 		{
   145 		iDrawingRegion.Clear();
   146 		iUseDrawingRegion=EFalse;
   147 		iGc->SetClippingRegion(iBaseRegion);
   148 		}
   149 	}
   150 
   151 void CWsAnimGc::CancelClippingRect()
   152 	{
   153 	if (!iUserActive)
   154 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   155 
   156 	if (iGc)
   157 		{
   158 		iClippingRect=TRect(iWin->Size());
   159 		iGc->SetClippingRect(iClippingRect);
   160 		}
   161 	}
   162 
   163 void CWsAnimGc::SetDrawMode(TDrawMode aDrawingMode)
   164 	{
   165 	if (!iUserActive)
   166 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   167 
   168 	if (iGc)
   169 		iGc->SetDrawMode(aDrawingMode);
   170 	}
   171 
   172 void CWsAnimGc::UseFont(const CFont *aFont)
   173 	{
   174 	CloseCurrentFont();
   175 	iFont=(CAnimFbsFont *)aFont;
   176 	iFont->Open();
   177 	if (!iUserActive)
   178 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   179 	if (iGc)
   180 		iGc->UseFontNoDuplicate(iFont);
   181 	}
   182 
   183 void CWsAnimGc::DiscardFont()
   184 	{
   185 	CloseCurrentFont();
   186 	if (!iUserActive)
   187 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   188 	if (iGc)
   189 		iGc->DiscardFont();
   190 	}
   191 
   192 void CWsAnimGc::SetUnderlineStyle(TFontUnderline aUnderlineStyle)
   193 	{
   194 	if (!iUserActive)
   195 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   196 	if (iGc)
   197 		iGc->SetUnderlineStyle(aUnderlineStyle);
   198 	}
   199 
   200 void CWsAnimGc::SetStrikethroughStyle(TFontStrikethrough aStrikethroughStyle)
   201 	{
   202 	if (!iUserActive)
   203 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   204 	if (iGc)
   205 		iGc->SetStrikethroughStyle(aStrikethroughStyle);
   206 	}
   207 
   208 void CWsAnimGc::SetWordJustification(TInt aExcessWidth,TInt aNumGaps)
   209 	{
   210 	if (!iUserActive)
   211 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   212 	if (iGc)
   213 		iGc->SetWordJustification(aExcessWidth,aNumGaps);
   214 	}
   215 
   216 void CWsAnimGc::SetCharJustification(TInt aExcessWidth,TInt aNumChars)
   217 	{
   218 	if (!iUserActive)
   219 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   220 	if (iGc)
   221 		iGc->SetCharJustification(aExcessWidth,aNumChars);
   222 	}
   223 
   224 void CWsAnimGc::SetPenColor(const TRgb &aColor)
   225 	{
   226 	if (!iUserActive)
   227 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   228 	if (iGc)
   229 		iGc->SetPenColor(aColor);
   230 	}
   231 
   232 void CWsAnimGc::SetPenStyle(TPenStyle aPenStyle)
   233 	{
   234 	if (!iUserActive)
   235 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   236 	if (iGc)
   237 		iGc->SetPenStyle(aPenStyle);
   238 	}
   239 
   240 void CWsAnimGc::SetPenSize(const TSize& aSize)
   241 	{
   242 	if (!iUserActive)
   243 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   244 	if (iGc)
   245 		iGc->SetPenSize(aSize);
   246 	}
   247 
   248 void CWsAnimGc::SetBrushColor(const TRgb &aColor)
   249 	{
   250 	if (!iUserActive)
   251 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   252 	if (iGc)
   253 		iGc->SetBrushColor(aColor);
   254 	}
   255 
   256 void CWsAnimGc::SetBrushStyle(TBrushStyle aBrushStyle)
   257 	{
   258 	if (!iUserActive)
   259 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   260 	if (iGc)
   261 		iGc->SetBrushStyle(aBrushStyle);
   262 	}
   263 
   264 void CWsAnimGc::SetBrushOrigin(const TPoint &aOrigin)
   265 	{
   266 	if (!iUserActive)
   267 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   268 	if (iGc)
   269 		iGc->SetBrushOrigin(aOrigin);
   270 	}
   271 
   272 void CWsAnimGc::UseBrushPattern(const CFbsBitmap *aBitmap)
   273 	{
   274 	if (!iUserActive)
   275 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   276 	if (iGc)
   277 		iGc->UseBrushPattern(aBitmap);
   278 	}
   279 
   280 void CWsAnimGc::DiscardBrushPattern()
   281 	{
   282 	if (!iUserActive)
   283 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   284 	if (iGc)
   285 		iGc->DiscardBrushPattern();
   286 	}
   287 
   288 void CWsAnimGc::SetFaded(TBool aFaded)
   289 	{
   290 	if (!iUserActive)
   291 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   292 	if (iGc)
   293 		iGc->SetFaded(aFaded);
   294 	}
   295 
   296 void CWsAnimGc::SetFadingParameters(TUint8 aBlackMap,TUint8 aWhiteMap)
   297 	{
   298 	if (!iUserActive)
   299 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   300 	if (iGc)
   301 		iGc->SetFadingParameters(aBlackMap,aWhiteMap);
   302 	}
   303 
   304 //
   305 // Drawing commands 								//
   306 //
   307 
   308 void CWsAnimGc::DrawArc(const TRect &aRect,const TPoint &aStart,const TPoint &aEnd)
   309 	{
   310 	if (!iUserActive)
   311 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   312 	if (iGc)
   313 		iGc->DrawArc(aRect,aStart,aEnd);
   314 	}
   315 
   316 void CWsAnimGc::DrawPie(const TRect &aRect,const TPoint &aStart,const TPoint &aEnd)
   317 	{
   318 	if (!iUserActive)
   319 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   320 	if (iGc)
   321 		iGc->DrawPie(aRect,aStart,aEnd);
   322 	}
   323 
   324 void CWsAnimGc::DrawLine(const TPoint &aPoint1,const TPoint &aPoint2)
   325 	{
   326 	if (!iUserActive)
   327 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   328 	if (iGc)
   329 		iGc->DrawLine(aPoint1, aPoint2);
   330 	}
   331 
   332 void CWsAnimGc::DrawLineTo(const TPoint &aPoint)
   333 	{
   334 	if (!iUserActive)
   335 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   336 	if (iGc)
   337 		iGc->DrawLineTo(aPoint);
   338 	}
   339 
   340 void CWsAnimGc::DrawLineBy(const TPoint &aPoint)
   341 	{
   342 	if (!iUserActive)
   343 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   344 	if (iGc)
   345 		iGc->DrawLineBy(aPoint);
   346 	}
   347 
   348 void CWsAnimGc::DrawEllipse(const TRect &aRect)
   349 	{
   350 	if (!iUserActive)
   351 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   352 	if (iGc)
   353 		iGc->DrawEllipse(aRect);
   354 	}
   355 
   356 void CWsAnimGc::DrawRect(const TRect &aRect)
   357 	{
   358 	if (!iUserActive)
   359 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   360 	if (iGc)
   361 		iGc->DrawRect(aRect);
   362 	}
   363 
   364 void CWsAnimGc::DrawRoundRect(const TRect &aRect,const TSize &aCornerSize)
   365 	{
   366 	if (!iUserActive)
   367 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   368 	if (iGc)
   369 		iGc->DrawRoundRect(aRect, aCornerSize);
   370 	}
   371 
   372 void CWsAnimGc::Clear(const TRect &aRect)
   373 	{
   374 	if (!iUserActive)
   375 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   376 	if (iGc)
   377 		iGc->Clear(aRect);
   378 	}
   379 
   380 void CWsAnimGc::Clear()
   381 	{
   382 	if (!iUserActive)
   383 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   384 	if (iGc)
   385 		iGc->Clear();
   386 	}
   387 
   388 void CWsAnimGc::BitBlt(const TPoint &aPoint,const CFbsBitmap *aBitmap)
   389 	{
   390 	if (!iUserActive)
   391 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   392 	if (iGc)
   393 		iGc->BitBlt(aPoint, aBitmap);
   394 	}
   395 
   396 void CWsAnimGc::BitBlt(const TPoint &aDestination,const CFbsBitmap *aBitmap,const TRect &aSource)
   397 	{
   398 	if (!iUserActive)
   399 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   400 	if (iGc)
   401 		iGc->BitBlt(aDestination, aBitmap, aSource);
   402 	}
   403 
   404 void CWsAnimGc::BitBltMasked(const TPoint& aPoint,const CFbsBitmap* aBitmap,const TRect& aSourceRect,const CFbsBitmap* aMaskBitmap,TBool aInvertMask)
   405 	{
   406 	if (!iUserActive)
   407 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   408 	if (iGc)
   409 		iGc->BitBltMasked(aPoint, aBitmap, aSourceRect, aMaskBitmap, aInvertMask);
   410 	}
   411 
   412 void CWsAnimGc::DrawBitmap(const TPoint &aTopLeft, const CFbsBitmap *aSource)
   413 	{
   414 	if (!iUserActive)
   415 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   416 	if (iGc)
   417 		iGc->DrawBitmap(aTopLeft, aSource);
   418 	}
   419 
   420 void CWsAnimGc::DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aSource)
   421 	{
   422 	if (!iUserActive)
   423 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   424 	if (iGc)
   425 		iGc->DrawBitmap(aDestRect, aSource);
   426 	}
   427 
   428 void CWsAnimGc::DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aSource, const TRect &aSrcRect)
   429 	{
   430 	if (!iUserActive)
   431 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   432 	if (iGc)
   433 		iGc->DrawBitmap(aDestRect, aSource, aSrcRect);
   434 	}
   435 
   436 void CWsAnimGc::DrawBitmapMasked(const TRect &aDestRect, const CFbsBitmap *aBitmap, const TRect &aSrcRect, const CFbsBitmap* aMaskBitmap, TBool aInvertMask)
   437 	{
   438 	if (!iUserActive)
   439 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   440 	if (iGc)
   441 		iGc->DrawBitmapMasked(aDestRect, aBitmap, aSrcRect, aMaskBitmap, aInvertMask);
   442 	}
   443 
   444 void CWsAnimGc::DrawBitmapMasked(const TRect& aDestRect,const CWsBitmap* aBitmap,const TRect& aSrcRect,const CWsBitmap* aMaskBitmap, TBool aInvertMask)
   445 	{
   446 	if (!iUserActive)
   447 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   448 	if (iGc)
   449 		iGc->DrawBitmapMasked(aDestRect, aBitmap, aSrcRect, aMaskBitmap, aInvertMask);
   450 	}
   451 
   452 void CWsAnimGc::DrawPolyLine(const TPoint* aPointList,TInt aNumPoints)
   453 	{
   454 	if (!iUserActive)
   455 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   456 	if (iGc)
   457 		iGc->DrawPolyLine(aPointList, aNumPoints);
   458 	}
   459 
   460 void CWsAnimGc::DrawPolyLine(const CArrayFix<TPoint> *aPointList)
   461 	{
   462 	if (!iUserActive)
   463 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   464 	if (iGc)
   465 		iGc->DrawPolyLine(aPointList);
   466 	}
   467 
   468 TInt CWsAnimGc::DrawPolygon(const TPoint* aPointList,TInt aNumPoints,TFillRule aFillRule)
   469 	{
   470 	TInt result = KErrNone;
   471 	if (!iUserActive)
   472 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   473 	if (iGc)
   474 		result = iGc->DrawPolygon(aPointList, aNumPoints, aFillRule);
   475 	return result;
   476 	}
   477 
   478 TInt CWsAnimGc::DrawPolygon(const CArrayFix<TPoint> *aPointList,TFillRule aFillRule)
   479 	{
   480 	TInt result = KErrNone;
   481 	if (!iUserActive)
   482 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   483 	if (iGc)
   484 		result = iGc->DrawPolygon(aPointList, aFillRule);
   485 	return result;
   486 	}
   487 
   488 void CWsAnimGc::DrawText(const TDesC &aString,const TPoint &aPosition)
   489 	{
   490 	if (!iFont)
   491 		iOwningWsAnim->Panic(EWservPanicNoFont);
   492 	if (iGc)
   493 		iGc->DrawText(aString, aPosition);
   494 	}
   495 
   496 void CWsAnimGc::DrawText(const TDesC &aString,const TRect &aBox,TInt aBaselineOffset,TTextAlign aHoriz,TInt aLeftMrg)
   497 	{
   498 	if (!iFont)
   499 		iOwningWsAnim->Panic(EWservPanicNoFont);
   500 	if (iGc)
   501 		iGc->DrawText(aString, aBox, aBaselineOffset, aHoriz, aLeftMrg);	
   502 	}
   503 
   504 void CWsAnimGc::MoveTo(const TPoint &aPoint)
   505 	{
   506 	if (!iUserActive)
   507 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   508 	if (iGc)
   509 		iGc->MoveTo(aPoint);
   510 	}
   511 
   512 void CWsAnimGc::MoveBy(const TPoint &aPoint)
   513 	{
   514 	if (!iUserActive)
   515 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   516 	if (iGc)
   517 		iGc->MoveBy(aPoint);
   518 	}
   519 
   520 void CWsAnimGc::Plot(const TPoint &aPoint)
   521 	{
   522 	if (!iUserActive)
   523 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   524 	if (iGc)
   525 		iGc->Plot(aPoint);
   526 	}
   527 
   528 void CWsAnimGc::SetOrigin(const TPoint &aPoint)
   529 	{
   530 	if (!iUserActive)
   531 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   532 	if (iGc)
   533 		iGc->SetOrigin(iWin->Origin() + aPoint);
   534 	}
   535 
   536 void CWsAnimGc::CopyRect(const TPoint& aOffset,const TRect& aRect)
   537 	{
   538 	if (!iUserActive)
   539 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   540 	if (iGc)
   541 		iGc->CopyRect(aOffset, aRect);
   542 	}
   543 
   544 void CWsAnimGc::Reset()
   545 	{
   546 	CloseCurrentFont();
   547 	if (!iUserActive)
   548 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   549 	if (iGc)
   550 		iGc->Reset();
   551 	SetOrigin(TPoint(0,0));
   552 	CancelClippingRect();
   553 	CancelClippingRegion();
   554 	}
   555 
   556 void CWsAnimGc::CloseCurrentFont()
   557 	{
   558 	if (iFont)
   559 		{
   560 		iFont->Close();
   561 		iFont=NULL;
   562 		}
   563 	}
   564 
   565 /**
   566 @see CBitmapContext::AlphaBlendBitmaps()*/
   567 TInt CWsAnimGc::AlphaBlendBitmaps(const TPoint& aDestPt, const CFbsBitmap* aSrcBmp,	const TRect& aSrcRect, const CFbsBitmap* aAlphaBmp,	const TPoint& aAlphaPt)	
   568 	{
   569 	TInt result = KErrNone;
   570 	if (!iUserActive)
   571 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   572 	if (iGc)
   573 		result = iGc->AlphaBlendBitmaps(aDestPt, aSrcBmp, aSrcRect, aAlphaBmp, aAlphaPt);
   574 	return result;
   575 	}
   576 
   577 /*Body stub implementation. The alternate AlphaBlendBitmap function using CFbsBitmaps should instead be used*/
   578 TInt CWsAnimGc::AlphaBlendBitmaps(const TPoint& /*aDestPt*/, const CWsBitmap* /*aSrcBmp*/,	const TRect& /*aSrcRect*/, const CWsBitmap* /*aAlphaBmp*/,	const TPoint& /*aAlphaPt*/)
   579 	{
   580 	return KErrNone;		
   581 	};
   582 
   583 /**
   584 @see CGraphicsContext::MapColors()*/
   585 void CWsAnimGc::MapColors(const TRect &aRect,const TRgb *aColors,TInt aNumPairs,TBool aMapForwards)
   586 	{
   587 	if (!iUserActive)
   588 		iOwningWsAnim->Panic(EWservPanicAnimLeave);
   589 	if (iGc)
   590 		iGc->MapColors(aRect, aColors, aNumPairs, aMapForwards);
   591 	}
   592 	
   593 /**
   594 @see CGraphicsContext::DrawTextVertical()*/
   595 void CWsAnimGc::DrawTextVertical(const TDesC& aText,const TPoint& aPos,TBool aUp)
   596 	{
   597 	if (!iFont) 
   598 		iOwningWsAnim->Panic(EWservPanicNoFont);
   599 	if (iGc)
   600 		iGc->DrawTextVertical(aText, aPos, aUp);
   601 	}
   602 
   603 /**
   604 @see CGraphicsContext::DrawTextVertical()*/
   605 void CWsAnimGc::DrawTextVertical(const TDesC& aText,const TRect& aBox,TInt aBaselineOffset,TBool aUp,TTextAlign aVert,TInt aMargin)
   606 	{
   607 	if (!iFont) 
   608 		iOwningWsAnim->Panic(EWservPanicNoFont);
   609 	if (iGc)
   610 		iGc->DrawTextVertical(aText, aBox, aBaselineOffset, aUp, aVert, aMargin);
   611 	}
   612