swftext.cpp

Go to the documentation of this file.
00001 // $Id: swftext.cpp 1313 2006-06-13 16:55:22Z alex $
00002 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
00003 ================================XARAHEADERSTART===========================
00004  
00005                Xara LX, a vector drawing and manipulation program.
00006                     Copyright (C) 1993-2006 Xara Group Ltd.
00007        Copyright on certain contributions may be held in joint with their
00008               respective authors. See AUTHORS file for details.
00009 
00010 LICENSE TO USE AND MODIFY SOFTWARE
00011 ----------------------------------
00012 
00013 This file is part of Xara LX.
00014 
00015 Xara LX is free software; you can redistribute it and/or modify it
00016 under the terms of the GNU General Public License version 2 as published
00017 by the Free Software Foundation.
00018 
00019 Xara LX and its component source files are distributed in the hope
00020 that it will be useful, but WITHOUT ANY WARRANTY; without even the
00021 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00022 See the GNU General Public License for more details.
00023 
00024 You should have received a copy of the GNU General Public License along
00025 with Xara LX (see the file GPL in the root directory of the
00026 distribution); if not, write to the Free Software Foundation, Inc., 51
00027 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00028 
00029 
00030 ADDITIONAL RIGHTS
00031 -----------------
00032 
00033 Conditional upon your continuing compliance with the GNU General Public
00034 License described above, Xara Group Ltd grants to you certain additional
00035 rights. 
00036 
00037 The additional rights are to use, modify, and distribute the software
00038 together with the wxWidgets library, the wxXtra library, and the "CDraw"
00039 library and any other such library that any version of Xara LX relased
00040 by Xara Group Ltd requires in order to compile and execute, including
00041 the static linking of that library to XaraLX. In the case of the
00042 "CDraw" library, you may satisfy obligation under the GNU General Public
00043 License to provide source code by providing a binary copy of the library
00044 concerned and a copy of the license accompanying it.
00045 
00046 Nothing in this section restricts any of the rights you have under
00047 the GNU General Public License.
00048 
00049 
00050 SCOPE OF LICENSE
00051 ----------------
00052 
00053 This license applies to this program (XaraLX) and its constituent source
00054 files only, and does not necessarily apply to other Xara products which may
00055 in part share the same code base, and are subject to their own licensing
00056 terms.
00057 
00058 This license does not apply to files in the wxXtra directory, which
00059 are built into a separate library, and are subject to the wxWindows
00060 license contained within that directory in the file "WXXTRA-LICENSE".
00061 
00062 This license does not apply to the binary libraries (if any) within
00063 the "libs" directory, which are subject to a separate license contained
00064 within that directory in the file "LIBS-LICENSE".
00065 
00066 
00067 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS
00068 ----------------------------------------------
00069 
00070 Subject to the terms of the GNU Public License (see above), you are
00071 free to do whatever you like with your modifications. However, you may
00072 (at your option) wish contribute them to Xara's source tree. You can
00073 find details of how to do this at:
00074   http://www.xaraxtreme.org/developers/
00075 
00076 Prior to contributing your modifications, you will need to complete our
00077 contributor agreement. This can be found at:
00078   http://www.xaraxtreme.org/developers/contribute/
00079 
00080 Please note that Xara will not accept modifications which modify any of
00081 the text between the start and end of this header (marked
00082 XARAHEADERSTART and XARAHEADEREND).
00083 
00084 
00085 MARKS
00086 -----
00087 
00088 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara
00089 designs are registered or unregistered trademarks, design-marks, and/or
00090 service marks of Xara Group Ltd. All rights in these marks are reserved.
00091 
00092 
00093       Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
00094                         http://www.xara.com/
00095 
00096 =================================XARAHEADEREND============================
00097  */
00098 #include "camtypes.h"
00099 //#include "paths.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00100 #include "nodetext.h"
00101 #include "swfexpdc.h"
00102 #include "swftext.h"
00103 
00104 #define new CAM_DEBUG_NEW
00105 
00106 /********************************************************************************************
00107 
00108 >   FlashTextRecord::FlashTextRecord ( void )
00109 
00110     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00111     Created:    14/10/99
00112     Inputs:     -
00113     Returns:    -
00114     Purpose:    Creates a FlashTextRecord list node, and initialises any values.
00115 
00116 ********************************************************************************************/
00117 
00118 FlashTextRecord::FlashTextRecord ( void )
00119 {
00120     // Initialise the member variables, so as to avoid any unpleasentness later.
00121     mTextID     = 0;
00122     mCurrent    = 0;
00123     mScaleX     = FLASH_FIXED_ONE;
00124     mScaleY     = FLASH_FIXED_ONE;
00125     mSkewY      = 0;
00126     mSkewX      = 0;
00127     mAscent     = 0;
00128     mpLast      = NULL;             // Pointer to the previous node.
00129     mpNext      = NULL;             // Pointer to the next node.
00130 }
00131 
00132 /********************************************************************************************
00133 
00134 >   FlashTextRecord::~FlashTextRecord ( void )
00135 
00136     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00137     Created:    14/10/99
00138     Inputs:     -
00139     Returns:    -
00140     Purpose:    Destroys this instance of FlashTextRecord.
00141 
00142 ********************************************************************************************/
00143 
00144 FlashTextRecord::~FlashTextRecord ( void )
00145 {
00146     // Clean up any stray values.
00147 }
00148 
00149 /********************************************************************************************
00150 
00151 >   FlashTextRecord* FlashTextRecord::AddElement ( void )
00152 
00153     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00154     Created:    14/10/99
00155     Inputs:     -
00156     Returns:    pTail - The pointer to the new node.
00157     Purpose:    Adds an element to the tail of the list.
00158 
00159 ********************************************************************************************/
00160 
00161 FlashTextRecord* FlashTextRecord::AddElement ( void )
00162 {
00163     FlashTextRecord *pTail = new FlashTextRecord;
00164     
00165     // Set the appropriate pointers.
00166     pTail->SetLast ( this );        // Ensure that a reference exists to this object...
00167     pTail->SetNext ( mpNext );      // Avoids any problems if mpLast isn't NULL.
00168     mpNext = pTail;                 // ... and a reference exists to the new one.
00169 
00170     return pTail;
00171 }
00172 
00173 /********************************************************************************************
00174 
00175 >   void FlashTextRecord::DeleteLastElement ( void )
00176 
00177     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00178     Created:    14/10/99
00179     Inputs:     -
00180     Returns:    -
00181     Purpose:    Deletes the previous item in the list.
00182 
00183 ********************************************************************************************/
00184 
00185 void FlashTextRecord::DeleteLastElement ( void )
00186 {
00187     FlashTextRecord *pToDelete = mpLast;
00188     
00189     // Reset mpLast to be mpLast->GetLast (), so that the list isn't broken.
00190     mpLast = mpLast->GetLast ();
00191 
00192     delete pToDelete;
00193 }
00194 
00195 /********************************************************************************************
00196 
00197 >   void FlashTextRecord::DeleteNextElement ( void )
00198 
00199     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00200     Created:    14/10/99
00201     Inputs:     -
00202     Returns:    -
00203     Purpose:    Deletes the next item in the list.
00204 
00205 ********************************************************************************************/
00206 
00207 void FlashTextRecord::DeleteNextElement ( void )
00208 {
00209     FlashTextRecord *pToDelete = mpNext;
00210     
00211     // Reset mpNext to be mpNext->GetNext (), so that the list isn't broken.
00212     mpNext = mpNext->GetNext ();
00213 
00214     delete pToDelete;
00215 }
00216 
00217 
00218 /********************************************************************************************
00219 
00220 >   TCHAR* FlashTextRecord::GetString ( void )
00221 
00222     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00223     Created:    14/10/99
00224     Inputs:     -
00225     Returns:    TCHAR* - A pointer to the contents of mText.
00226     Purpose:    Gets a pointer to mText.
00227 
00228 ********************************************************************************************/
00229 
00230 INT32* FlashTextRecord::GetString ( void )
00231 {
00232     return mText;
00233 }
00234 
00235 /********************************************************************************************
00236 
00237 >   BOOL FlashTextRecord::IsFull ( void )
00238 
00239     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00240     Created:    14/10/99
00241     Inputs:     -
00242     Returns:    TRUE if the string is full, otherwise FALSE.
00243     Purpose:    Used to determine whether the string is full.
00244 
00245 ********************************************************************************************/
00246 
00247 BOOL FlashTextRecord::IsFull ( void )
00248 {
00249     // Compare the string's length with the maximum length of the string. Doing it this way
00250     // allows the string length to be changed internally without having to alter the class's
00251     // interface.
00252     if ( mCurrent >= FTR_STRING_SIZE )
00253         return TRUE;
00254     else
00255         return FALSE;
00256 }
00257 
00258 /********************************************************************************************
00259 
00260 >   DocCoord FlashTextRecord::GetPosition ( void )
00261 
00262     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00263     Created:    14/10/99
00264     Inputs:     -
00265     Returns:    mPosition - The position of this string in the Flash image.
00266     Purpose:    Gets the value of mPosition.
00267 
00268 ********************************************************************************************/
00269 
00270 DocCoord FlashTextRecord::GetPosition ( void )
00271 {
00272     return mPosition;
00273 }
00274 
00275 /********************************************************************************************
00276 
00277 >   DocRect FlashTextRecord::GetBounds ( void )
00278 
00279     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00280     Created:    17/10/99
00281     Inputs:     -
00282     Returns:    mTextBounds - The bounding box of the text.
00283     Purpose:    Gets the value of mTextBounds.
00284 
00285 ********************************************************************************************/
00286 
00287 DocRect FlashTextRecord::GetBounds ( void )
00288 {
00289     return mTextBounds;
00290 }
00291 
00292 /********************************************************************************************
00293 
00294 >   INT32* FlashTextRecord::GetAdvances ( void )
00295 
00296     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00297     Created:    17/10/99
00298     Inputs:     -
00299     Returns:    DWORD* - A pointer to mAdvances [0].
00300     Purpose:    Gets a pointer to mAdvances
00301 
00302 ********************************************************************************************/
00303 
00304 INT32* FlashTextRecord::GetAdvances ( void )
00305 {
00306     return mAdvances;
00307 }
00308 
00309 /********************************************************************************************
00310 
00311 >   WORD* FlashTextRecord::GetSizes ( void )
00312 
00313     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00314     Created:    17/10/99
00315     Inputs:     -
00316     Returns:    WORD* - A pointer to mCharacterSize.
00317     Purpose:    Gets a pointer to mCharacterSize [].
00318 
00319 
00320 ********************************************************************************************/
00321 
00322 WORD* FlashTextRecord::GetSizes ( void )
00323 {
00324     return mCharacterSize;
00325 }
00326 
00327 /********************************************************************************************
00328 
00329 >   FlashColour* FlashTextRecord::GetColours ( void )
00330 
00331     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00332     Created:    17/10/99
00333     Inputs:     -
00334     Returns:    DocColour* - A pointer to mCharacterColour.
00335     Purpose:    Gets a pointer to mCharacterColour.
00336 
00337 ********************************************************************************************/
00338 
00339 FlashColour* FlashTextRecord::GetColours ( void )
00340 {
00341     return mCharacterColour;
00342 }
00343 
00344 /********************************************************************************************
00345 
00346 >   WORD* FlashTextRecord::GetFontStyles ( void )
00347 
00348     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00349     Created:    17/10/99
00350     Inputs:     -
00351     Returns:    WORD* - A pointer to mCharacterStyle.
00352     Purpose:    Gets a pointer to mCharacterStyle.
00353 
00354 ********************************************************************************************/
00355 
00356 WORD* FlashTextRecord::GetFontStyles ( void )
00357 {
00358     return mCharacterStyle;
00359 }
00360 
00361 /********************************************************************************************
00362 
00363 >   INT8* FlashTextRecord::GetOffsets ( void )
00364 
00365     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00366     Created:    17/10/99
00367     Inputs:     -
00368     Returns:    INT8* - A pointer to mOffsetss.
00369     Purpose:    Gets a pointer to mOffsetss.
00370 
00371 ********************************************************************************************/
00372 
00373 INT8* FlashTextRecord::GetOffsets ( void )
00374 {
00375     return mOffsets;
00376 }
00377 
00378 /********************************************************************************************
00379 
00380 >   FIXED16 FlashTextRecord::GetAspect ( void )
00381 
00382     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00383     Created:    17/10/99
00384     Inputs:     -
00385     Returns:    FIXED16 - The character's aspect ratio.
00386     Purpose:    Gets the value of mAspectRatio
00387 
00388 ********************************************************************************************/
00389 
00390 FIXED16 FlashTextRecord::GetAspect ( void )
00391 {
00392     return mAspectRatio;
00393 }
00394 
00395 /********************************************************************************************
00396 
00397 >   INT32 FlashTextRecord::GetAscent ( void )
00398 
00399     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00400     Created:    24/11/99
00401     Inputs:     -
00402     Returns:    INT32 - The character's ascent.
00403     Purpose:    Gets the value of mAscent.
00404 
00405 ********************************************************************************************/
00406 
00407 INT32 FlashTextRecord::GetAscent ( void )
00408 {
00409     return mAscent;
00410 }
00411 
00412 /********************************************************************************************
00413 
00414 >   INT32 FlashTextRecord::GetCount ( void )
00415 
00416     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00417     Created:    17/10/99
00418     Inputs:     -
00419     Returns:    INT32 - The length of the text string.
00420     Purpose:    Gets the length of the text string stored within the FlashTextRecord.
00421 
00422 ********************************************************************************************/
00423 
00424 INT32 FlashTextRecord::GetCount ( void )
00425 {
00426     return mCurrent;
00427 }
00428 
00429 /********************************************************************************************
00430 
00431 >   WORD FlashTextRecord::GetTextID ( void )
00432 
00433     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00434     Created:    22/10/99
00435     Inputs:     -
00436     Returns:    WORD - The value of mTextID.
00437     Purpose:    Gets the ID for this text record.
00438 
00439 ********************************************************************************************/
00440 
00441 WORD FlashTextRecord::GetTextID ( void )
00442 {
00443     return mTextID;
00444 }
00445 
00446 /********************************************************************************************
00447 
00448 >   FlashTextRecord* FlashTextRecord::GetLast ( void )
00449 
00450     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00451     Created:    14/10/99
00452     Inputs:     -
00453     Returns:    *mpLast - A pointer to the previous node in the linked list.
00454     Purpose:    Gets mpLast.
00455 
00456 ********************************************************************************************/
00457 
00458 FlashTextRecord* FlashTextRecord::GetLast ( void )
00459 {
00460     return mpLast;
00461 }
00462 
00463 /********************************************************************************************
00464 
00465 >   FlashTextRecord* FlashTextRecord::GetNext ( void )
00466 
00467     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00468     Created:    14/10/99
00469     Inputs:     -
00470     Returns:    *mpNext - A pointer to the next node in the linked list.
00471     Purpose:    Gets mpNext.
00472 
00473 ********************************************************************************************/
00474 
00475 FlashTextRecord* FlashTextRecord::GetNext ( void )
00476 {
00477     return mpNext;
00478 }
00479 
00480 /********************************************************************************************
00481 
00482 >   INT32 FlashTextRecord::AddChar ( TextChar *pTheLetter,
00483                                    INT32 FlashCode )
00484 
00485     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00486     Created:    14/10/99
00487     Inputs:     TheLetter - The character to add to mText.
00488     Returns:    The position of this character within the array, or -1 if there's been a
00489                 problem.
00490     Purpose:    Adds FlashCode to the end of mText, and updates the bounding rectangle, and
00491                 calculates the Advance for this letter from the original letter record within
00492                 the Camelot tree. The FlashCode value is returned by
00493                 FlashFontRecord::AddGlyph (), and is needed to access the correct character
00494                 record by a Flash viewer.
00495 
00496 ********************************************************************************************/
00497 
00498 INT32 FlashTextRecord::AddChar ( TextChar *pTheLetter,
00499                                INT32 FlashCode )
00500 {
00501     INT32 Index = -1;       // Traditional UNIX error value.
00502     
00503     if ( pTheLetter != NULL )
00504     {
00505         // Get the current character, and store it within the array.
00506         mText [mCurrent] = FlashCode;
00507         Index = mCurrent;
00508         mCurrent ++;
00509 
00510         // Set the advance value. (i.e. how far the character is from the start of the string.
00511         SetAdvance ( pTheLetter->GetCharAdvance (), Index );
00512     }
00513 
00514     return Index;
00515 }
00516 
00517 /********************************************************************************************
00518 
00519 >   void FlashTextRecord::SetPosition ( DocCoord Point )
00520 
00521     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00522     Created:    14/10/99
00523     Inputs:     Point - The position of the start of the TextLine.
00524     Returns:    -
00525     Purpose:    Sets the value of mPosition.
00526 
00527 ********************************************************************************************/
00528 
00529 void FlashTextRecord::SetPosition ( DocCoord Point )
00530 {
00531     mPosition = Point;
00532 }
00533 
00534 /********************************************************************************************
00535 
00536 >   void FlashTextRecord::SetBounds ( DocRect Bounds )
00537 
00538     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00539     Created:    17/10/99
00540     Inputs:     Bounds - The bounding box of the text string.
00541     Returns:    -
00542     Purpose:    Sets the value of mTextBounds.
00543 
00544 ********************************************************************************************/
00545 
00546 void FlashTextRecord::SetBounds ( DocRect Bounds )
00547 {
00548     mTextBounds = Bounds;
00549 }
00550 
00551 /********************************************************************************************
00552 
00553 >   void FlashTextRecord::SetAdvance ( INT32 Advance,
00554                                       INT32 i )
00555 
00556     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00557     Created:    17/10/99
00558     Inputs:     Advance - The advance for this character.
00559                 i - The position at which the value is to be added.
00560     Returns:    -
00561     Purpose:    Sets the value of mAdvances at position i. ( mAdvances [i] )
00562 
00563 ********************************************************************************************/
00564 
00565 void FlashTextRecord::SetAdvance ( INT32 Advance,
00566                                   INT32 i )
00567 {
00568     // Convert from millipoints to twips.
00569     Advance /= FLASH_SCALE;
00570 
00571     // Stores the advance for the current font.
00572     mAdvances [i] = Advance;
00573 }
00574 
00575 /********************************************************************************************
00576 
00577 >   void FlashTextRecord::SetSize ( MILLIPOINT Size,
00578                                     INT32 i )
00579 
00580     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00581     Created:    17/10/99
00582     Inputs:     Size - The height of the current font style.
00583                 i - The position at which the value is to be added.
00584     Returns:    -
00585     Purpose:    Sets the value of mCharacterSize at position i. ( mCharacterSize [i] )
00586 
00587 ********************************************************************************************/
00588 
00589 void FlashTextRecord::SetSize ( MILLIPOINT Size,
00590                                 INT32 i )
00591 {
00592     Size /= FLASH_SCALE;
00593     mCharacterSize [i] = ( WORD ) Size;
00594 }
00595 
00596 /********************************************************************************************
00597 
00598 >   void FlashTextRecord::SetColour ( DocColour *Colour,
00599                                       BYTE Alpha,
00600                                       INT32 i )
00601 
00602     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00603     Created:    12/10/99
00604     Inputs:     Colour - A standard Camelot colour.
00605                 Alpha - The transparency value.
00606                 i - The index value.
00607     Returns:    -
00608     Purpose:    Sets the value of ColourValue[i] to have the RGB colour from the DocColour,
00609                 and the Alpha value from Alpha.
00610 
00611 ********************************************************************************************/
00612 
00613 void FlashTextRecord::SetColour ( DocColour *Colour,
00614                                   UINT32 *Alpha,
00615                                   INT32 i )
00616 {
00617     INT32 lRed, lGreen, lBlue;
00618 
00619     // If no colour pointer has been set, return.
00620     if ( Colour == NULL )
00621         return;
00622 
00623     // Extract the colour value from DocColour.
00624     Colour->GetRGBValue ( &lRed, &lGreen, &lBlue );
00625 
00626     // And cast it into the record as an RGB triplet of BYTEs.
00627     mCharacterColour [i].Red    = ( BYTE ) lRed;
00628     mCharacterColour [i].Green  = ( BYTE ) lGreen;
00629     mCharacterColour [i].Blue   = ( BYTE ) lBlue;
00630     mCharacterColour [i].Alpha  = 255 - ( BYTE ) ( *Alpha );
00631 }
00632 
00633 /********************************************************************************************
00634 
00635 >   void FlashTextRecord::SetStyle ( WORD Style,
00636                                      INT32 i )
00637 
00638     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00639     Created:    17/10/99
00640     Inputs:     Style - A handle to a current font sytle.
00641                 i - The position at which the value is to be added.
00642     Returns:    -
00643     Purpose:    Sets the value of mCharacterStyle [i].
00644 
00645 ********************************************************************************************/
00646 
00647 void FlashTextRecord::SetStyle ( WORD Style,
00648                                  INT32 i )
00649 {
00650     mCharacterStyle [i] = Style;
00651 }
00652 
00653 /********************************************************************************************
00654 
00655 >   void FlashTextRecord::SetOffset ( INT32 Offset,
00656                                         INT32 i )
00657 
00658     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00659     Created:    9/11/99
00660     Inputs:     Offset - The value of the current font's offset.
00661                 i - The position at which the value is to be added.
00662     Returns:    -
00663     Purpose:    Sets the value of mOffsets [i].
00664 
00665 ********************************************************************************************/
00666 
00667 void FlashTextRecord::SetOffset ( INT32 Offset,
00668                                   INT32 i )
00669 {
00670     Offset /= FLASH_SCALE;
00671     mOffsets [i] = ( INT8 ) Offset;
00672 }
00673 
00674 /********************************************************************************************
00675 
00676 >   void FlashTextRecord::SetAspect ( FIXED16 AspectRatio )
00677 
00678     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00679     Created:    14/10/99
00680     Inputs:     FIXED16 - The AspectRatio of the line of text.
00681     Returns:    -
00682     Purpose:    Sets the value of mAspectRatio.
00683 
00684 ********************************************************************************************/
00685 
00686 void FlashTextRecord::SetAspect ( FIXED16 AspectRatio )
00687 {
00688     mAspectRatio = AspectRatio;
00689 }
00690 
00691 /********************************************************************************************
00692 
00693 >   void FlashTextRecord::SetAscent ( INT32 Ascent )
00694 
00695     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00696     Created:    24/11/99
00697     Inputs:     INT32 - The ascent of the first character in the line of text.
00698     Returns:    -
00699     Purpose:    Sets the value of mAscent.
00700 
00701 ********************************************************************************************/
00702 
00703 void FlashTextRecord::SetAscent ( INT32 Ascent )
00704 {
00705     Ascent /= FLASH_SCALE;
00706 
00707     if ( Ascent > mAscent )
00708         mAscent = Ascent;
00709 }
00710 
00711 /********************************************************************************************
00712 
00713 >   void FlashTextRecord::SetTextID ( WORD ID )
00714 
00715     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00716     Created:    22/10/99
00717     Inputs:     WORD - The ID value to be set.
00718     Returns:    -
00719     Purpose:    Sets the value of mTextID.
00720 
00721 ********************************************************************************************/
00722 
00723 void FlashTextRecord::SetTextID ( WORD ID )
00724 {
00725     mTextID = ID;
00726 }
00727 
00728 /********************************************************************************************
00729 
00730 >   void FlashTextRecord::SetLast ( FlashTextRecord *pLast )
00731 
00732     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00733     Created:    14/10/99
00734     Inputs:     pLast - A pointer to the previous FlashTextRecord in the linked list.
00735     Returns:    -
00736     Purpose:    Sets the value of mpLast.
00737 
00738 ********************************************************************************************/
00739 
00740 void FlashTextRecord::SetLast ( FlashTextRecord *pLast )
00741 {
00742     mpLast = pLast;
00743 }
00744 
00745 /********************************************************************************************
00746 
00747 >   void FlashTextRecord::SetNext ( FlashTextRecord *pNext )
00748 
00749     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00750     Created:    14/10/99
00751     Inputs:     pNext - A pointer to the next FlashTextRecord in the linked list.
00752     Returns:    -
00753     Purpose:    Sets the value of mpNext.
00754 
00755 ********************************************************************************************/
00756 
00757 void FlashTextRecord::SetNext ( FlashTextRecord *pNext )
00758 {
00759     mpNext = pNext;
00760 }
00761 
00762 /********************************************************************************************
00763 
00764 >   void FlashTextRecord::SetSkewY ( INT32 Skew )
00765 
00766     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00767     Created:    4/11/99
00768     Inputs:     Skew - The value for mSkewY.
00769     Returns:    -
00770     Purpose:    Sets mSkewY.
00771 
00772 ********************************************************************************************/
00773 
00774 void FlashTextRecord::SetSkewY ( INT32 Skew )
00775 {
00776     mSkewY = Skew;
00777 }
00778 
00779 /********************************************************************************************
00780 
00781 >   INT32 FlashTextRecord::GetSkewY ( void )
00782 
00783     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00784     Created:    4/11/99
00785     Inputs:     -
00786     Returns:    mSkewY
00787     Purpose:    Gets mSkewY.
00788 
00789 ********************************************************************************************/
00790 
00791 INT32 FlashTextRecord::GetSkewY ( void )
00792 {
00793     return mSkewY;
00794 }
00795 
00796 /********************************************************************************************
00797 
00798 >   void FlashTextRecord::SetSkewX ( INT32 Skew )
00799 
00800     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00801     Created:    4/11/99
00802     Inputs:     Skew - The value for mSkewX.
00803     Returns:    -
00804     Purpose:    Sets mSkewX.
00805 
00806 ********************************************************************************************/
00807 
00808 void FlashTextRecord::SetSkewX ( INT32 Skew )
00809 {
00810     mSkewX = Skew;
00811 }
00812 
00813 /********************************************************************************************
00814 
00815 >   INT32 FlashTextRecord::GetSkewX ( void )
00816 
00817     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00818     Created:    4/11/99
00819     Inputs:     -
00820     Returns:    mSkewX
00821     Purpose:    Gets mSkewX.
00822 
00823 ********************************************************************************************/
00824 
00825 INT32 FlashTextRecord::GetSkewX ( void )
00826 {
00827     return mSkewX;
00828 }
00829 
00830 /********************************************************************************************
00831 
00832 >   void FlashTextRecord::SetScaleX ( INT32 Scale )
00833 
00834     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00835     Created:    4/11/99
00836     Inputs:     Scale - The value for mScaleX.
00837     Returns:    -
00838     Purpose:    Sets mScaleX.
00839 
00840 ********************************************************************************************/
00841 
00842 void FlashTextRecord::SetScaleX ( INT32 Scale )
00843 {
00844     mScaleX = Scale;
00845 }
00846 
00847 /********************************************************************************************
00848 
00849 >   INT32 FlashTextRecord::GetScaleX ( void )
00850 
00851     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00852     Created:    4/11/99
00853     Inputs:     -
00854     Returns:    mScaleX
00855     Purpose:    Gets mScaleX.
00856 
00857 ********************************************************************************************/
00858 
00859 INT32 FlashTextRecord::GetScaleX ( void )
00860 {
00861     return mScaleX;
00862 }
00863 
00864 /********************************************************************************************
00865 
00866 >   void FlashTextRecord::SetScaleY ( INT32 Scale )
00867 
00868     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00869     Created:    4/11/99
00870     Inputs:     Scale - The value for mScaleY.
00871     Returns:    -
00872     Purpose:    Sets mScaleY.
00873 
00874 ********************************************************************************************/
00875 
00876 void FlashTextRecord::SetScaleY ( INT32 Scale )
00877 {
00878     mScaleY = Scale;
00879 }
00880 
00881 /********************************************************************************************
00882 
00883 >   INT32 FlashTextRecord::GetScaleY ( void )
00884 
00885     Author:     Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
00886     Created:    4/11/99
00887     Inputs:     -
00888     Returns:    mScaleY
00889     Purpose:    Gets mScaleY.
00890 
00891 ********************************************************************************************/
00892 
00893 INT32 FlashTextRecord::GetScaleY ( void )
00894 {
00895     return mScaleY;
00896 }
00897 

Generated on Sat Nov 10 03:47:08 2007 for Camelot by  doxygen 1.4.4