#include <swftext.h>
Inheritance diagram for FlashTextRecord:
Public Member Functions | |
FlashTextRecord (void) | |
Creates a FlashTextRecord list node, and initialises any values. | |
~FlashTextRecord (void) | |
Destroys this instance of FlashTextRecord. | |
FlashTextRecord * | AddElement (void) |
Adds an element to the tail of the list. | |
void | DeleteLastElement (void) |
Deletes the previous item in the list. | |
void | DeleteNextElement (void) |
Deletes the next item in the list. | |
INT32 * | GetString (void) |
Gets a pointer to mText. | |
BOOL | IsFull (void) |
Used to determine whether the string is full. | |
DocCoord | GetPosition (void) |
Gets the value of mPosition. | |
DocRect | GetBounds (void) |
Gets the value of mTextBounds. | |
INT32 * | GetAdvances (void) |
Gets a pointer to mAdvances. | |
WORD * | GetSizes (void) |
Gets a pointer to mCharacterSize []. | |
FlashColour * | GetColours (void) |
Gets a pointer to mCharacterColour. | |
WORD * | GetFontStyles (void) |
Gets a pointer to mCharacterStyle. | |
INT8 * | GetOffsets (void) |
Gets a pointer to mOffsetss. | |
FIXED16 | GetAspect (void) |
Gets the value of mAspectRatio. | |
INT32 | GetAscent (void) |
Gets the value of mAscent. | |
INT32 | GetCount (void) |
Gets the length of the text string stored within the FlashTextRecord. | |
WORD | GetTextID (void) |
Gets the ID for this text record. | |
FlashTextRecord * | GetLast (void) |
Gets mpLast. | |
FlashTextRecord * | GetNext (void) |
Gets mpNext. | |
INT32 | AddChar (TextChar *pTheLetter, INT32 FlashCode) |
Adds FlashCode to the end of mText, and updates the bounding rectangle, and calculates the Advance for this letter from the original letter record within the Camelot tree. The FlashCode value is returned by FlashFontRecord::AddGlyph (), and is needed to access the correct character record by a Flash viewer. | |
void | SetPosition (DocCoord Point) |
Sets the value of mPosition. | |
void | SetBounds (DocRect Bounds) |
Sets the value of mTextBounds. | |
void | SetAdvance (INT32 Advance, INT32 i) |
Sets the value of mAdvances at position i. ( mAdvances [i] ). | |
void | SetSize (MILLIPOINT Size, INT32 i) |
Sets the value of mCharacterSize at position i. ( mCharacterSize [i] ). | |
void | SetColour (DocColour *Colour, UINT32 *Alpha, INT32 i) |
Sets the value of ColourValue[i] to have the RGB colour from the DocColour, and the Alpha value from Alpha. | |
void | SetStyle (WORD Style, INT32 i) |
Sets the value of mCharacterStyle [i]. | |
void | SetOffset (INT32 Offset, INT32 i) |
Sets the value of mOffsets [i]. | |
void | SetAspect (FIXED16 AspectRatio) |
Sets the value of mAspectRatio. | |
void | SetTextID (WORD ID) |
Sets the value of mTextID. | |
void | SetAscent (INT32 Ascent) |
Sets the value of mAscent. | |
void | SetLast (FlashTextRecord *pLast) |
Sets the value of mpLast. | |
void | SetNext (FlashTextRecord *pNext) |
Sets the value of mpNext. | |
INT32 | GetSkewX (void) |
Gets mSkewX. | |
INT32 | GetSkewY (void) |
Gets mSkewY. | |
INT32 | GetScaleX (void) |
Gets mScaleX. | |
INT32 | GetScaleY (void) |
Gets mScaleY. | |
void | SetSkewX (INT32 Skew) |
Sets mSkewX. | |
void | SetSkewY (INT32 Skew) |
Sets mSkewY. | |
void | SetScaleX (INT32 Scale) |
Sets mScaleX. | |
void | SetScaleY (INT32 Scale) |
Sets mScaleY. | |
Private Attributes | |
DocCoord | mPosition |
DocRect | mTextBounds |
INT32 | mText [256] |
INT32 | mAdvances [256] |
WORD | mCharacterSize [256] |
FlashColour | mCharacterColour [256] |
WORD | mCharacterStyle [256] |
INT8 | mOffsets [256] |
INT32 | mCurrent |
FIXED16 | mAspectRatio |
INT32 | mAscent |
WORD | mTextID |
FlashTextRecord * | mpLast |
FlashTextRecord * | mpNext |
INT32 | mScaleX |
INT32 | mScaleY |
INT32 | mSkewX |
INT32 | mSkewY |
Definition at line 118 of file swftext.h.
|
Creates a FlashTextRecord list node, and initialises any values.
Definition at line 118 of file swftext.cpp. 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 }
|
|
Destroys this instance of FlashTextRecord.
Definition at line 144 of file swftext.cpp.
|
|
Adds FlashCode to the end of mText, and updates the bounding rectangle, and calculates the Advance for this letter from the original letter record within the Camelot tree. The FlashCode value is returned by FlashFontRecord::AddGlyph (), and is needed to access the correct character record by a Flash viewer.
Definition at line 498 of file swftext.cpp. 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 }
|
|
Adds an element to the tail of the list.
Definition at line 161 of file swftext.cpp. 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 }
|
|
Deletes the previous item in the list.
Definition at line 185 of file swftext.cpp. 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 }
|
|
Deletes the next item in the list.
Definition at line 207 of file swftext.cpp. 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 }
|
|
Gets a pointer to mAdvances.
Definition at line 304 of file swftext.cpp. 00305 { 00306 return mAdvances; 00307 }
|
|
Gets the value of mAscent.
Definition at line 407 of file swftext.cpp. 00408 { 00409 return mAscent; 00410 }
|
|
Gets the value of mAspectRatio.
Definition at line 390 of file swftext.cpp. 00391 { 00392 return mAspectRatio; 00393 }
|
|
Gets the value of mTextBounds.
Definition at line 287 of file swftext.cpp. 00288 { 00289 return mTextBounds; 00290 }
|
|
Gets a pointer to mCharacterColour.
Definition at line 339 of file swftext.cpp. 00340 { 00341 return mCharacterColour; 00342 }
|
|
Gets the length of the text string stored within the FlashTextRecord.
Definition at line 424 of file swftext.cpp. 00425 { 00426 return mCurrent; 00427 }
|
|
Gets a pointer to mCharacterStyle.
Definition at line 356 of file swftext.cpp. 00357 { 00358 return mCharacterStyle; 00359 }
|
|
Gets mpLast.
Definition at line 458 of file swftext.cpp. 00459 { 00460 return mpLast; 00461 }
|
|
Gets mpNext.
Definition at line 475 of file swftext.cpp. 00476 { 00477 return mpNext; 00478 }
|
|
Gets a pointer to mOffsetss.
Definition at line 373 of file swftext.cpp. 00374 { 00375 return mOffsets; 00376 }
|
|
Gets the value of mPosition.
Definition at line 270 of file swftext.cpp. 00271 { 00272 return mPosition; 00273 }
|
|
Gets mScaleX.
Definition at line 859 of file swftext.cpp. 00860 { 00861 return mScaleX; 00862 }
|
|
Gets mScaleY.
Definition at line 893 of file swftext.cpp. 00894 { 00895 return mScaleY; 00896 }
|
|
Gets a pointer to mCharacterSize [].
Definition at line 322 of file swftext.cpp. 00323 { 00324 return mCharacterSize; 00325 }
|
|
Gets mSkewX.
Definition at line 825 of file swftext.cpp. 00826 { 00827 return mSkewX; 00828 }
|
|
Gets mSkewY.
Definition at line 791 of file swftext.cpp. 00792 { 00793 return mSkewY; 00794 }
|
|
Gets a pointer to mText.
Definition at line 230 of file swftext.cpp. 00231 { 00232 return mText; 00233 }
|
|
Gets the ID for this text record.
Definition at line 441 of file swftext.cpp. 00442 { 00443 return mTextID; 00444 }
|
|
Used to determine whether the string is full.
Definition at line 247 of file swftext.cpp. 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 }
|
|
Sets the value of mAdvances at position i. ( mAdvances [i] ).
Definition at line 565 of file swftext.cpp. 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 }
|
|
Sets the value of mAscent.
Definition at line 703 of file swftext.cpp. 00704 { 00705 Ascent /= FLASH_SCALE; 00706 00707 if ( Ascent > mAscent ) 00708 mAscent = Ascent; 00709 }
|
|
Sets the value of mAspectRatio.
Definition at line 686 of file swftext.cpp. 00687 { 00688 mAspectRatio = AspectRatio; 00689 }
|
|
Sets the value of mTextBounds.
Definition at line 546 of file swftext.cpp. 00547 { 00548 mTextBounds = Bounds; 00549 }
|
|
Sets the value of ColourValue[i] to have the RGB colour from the DocColour, and the Alpha value from Alpha.
Definition at line 613 of file swftext.cpp. 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 }
|
|
Sets the value of mpLast.
Definition at line 740 of file swftext.cpp. 00741 { 00742 mpLast = pLast; 00743 }
|
|
Sets the value of mpNext.
Definition at line 757 of file swftext.cpp. 00758 { 00759 mpNext = pNext; 00760 }
|
|
Sets the value of mOffsets [i].
Definition at line 667 of file swftext.cpp. 00669 { 00670 Offset /= FLASH_SCALE; 00671 mOffsets [i] = ( INT8 ) Offset; 00672 }
|
|
Sets the value of mPosition.
Definition at line 529 of file swftext.cpp. 00530 { 00531 mPosition = Point; 00532 }
|
|
Sets mScaleX.
Definition at line 842 of file swftext.cpp. 00843 { 00844 mScaleX = Scale; 00845 }
|
|
Sets mScaleY.
Definition at line 876 of file swftext.cpp. 00877 { 00878 mScaleY = Scale; 00879 }
|
|
Sets the value of mCharacterSize at position i. ( mCharacterSize [i] ).
Definition at line 589 of file swftext.cpp. 00591 { 00592 Size /= FLASH_SCALE; 00593 mCharacterSize [i] = ( WORD ) Size; 00594 }
|
|
Sets mSkewX.
Definition at line 808 of file swftext.cpp. 00809 { 00810 mSkewX = Skew; 00811 }
|
|
Sets mSkewY.
Definition at line 774 of file swftext.cpp. 00775 { 00776 mSkewY = Skew; 00777 }
|
|
Sets the value of mCharacterStyle [i].
Definition at line 647 of file swftext.cpp. 00649 { 00650 mCharacterStyle [i] = Style; 00651 }
|
|
Sets the value of mTextID.
Definition at line 723 of file swftext.cpp.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|