#include <txtattr.h>
Inheritance diagram for TxtAspectRatioAttribute:

Public Member Functions | |
| TxtAspectRatioAttribute () | |
| Default Constuctor for TxtAspectRatioAttribute A zero aspect ratio is set.   | |
| TxtAspectRatioAttribute (FIXED16 aspect) | |
| TxtAspectRatioAttribute constructor.   | |
| virtual void | Restore (RenderRegion *, BOOL) | 
| Restores the TxtAspectRatioAttribute attribute for the given render region.   | |
| virtual void | Render (RenderRegion *pRegion, BOOL Temp=FALSE) | 
| Sets the TxtFontTypeface attribute for the given render region.   | |
| virtual void | SimpleCopy (AttributeValue *) | 
| See AttributeValue::SimpleCopy.   | |
| virtual NodeAttribute * | MakeNode () | 
| Make a AttrTextFontTypeface node, see base class.   | |
| BOOL | IsDifferent (AttributeValue *pAttr) | 
| See base class version.   | |
| virtual TxtAspectRatioAttribute & | operator= (TxtAspectRatioAttribute &Attrib) | 
| Make the Attribute the same as the other.   | |
| INT32 | operator== (const TxtAspectRatioAttribute &Attrib) | 
| Comparison operator. See NodeAttribute::operator== for a description of why it's required.   | |
Static Public Member Functions | |
| static BOOL | Init () | 
| Registers default attribute.   | |
Public Attributes | |
| FIXED16 | AspectRatio | 
Definition at line 444 of file txtattr.h.
      
  | 
  
| 
 Default Constuctor for TxtAspectRatioAttribute A zero aspect ratio is set. 
 
 
 Definition at line 1318 of file txtattr.cpp. 01319 { 01320 AspectRatio = 1; 01321 } 
  | 
  
      
  | 
  
| 
 TxtAspectRatioAttribute constructor. 
 
 
 
 Definition at line 1335 of file txtattr.cpp. 01336 { 01337 AspectRatio = aspect; 01338 } 
  | 
  
      
  | 
  
| 
 Registers default attribute. 
 
 
 
 
 Reimplemented from SimpleCCObject. Definition at line 1471 of file txtattr.cpp. 01472 { 01473 TxtAspectRatioAttribute *pAttr = new TxtAspectRatioAttribute; 01474 if (pAttr==NULL) 01475 // error message has already been set by new 01476 return FALSE; 01477 01478 UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(BaseTextClass), 01479 pAttr); 01480 01481 ERROR2IF(ID == ATTR_BAD_ID, FALSE, "Bad ID when Initialising TxtAspectRatioAttribute"); 01482 01483 return TRUE; 01484 } 
  | 
  
      
  | 
  
| 
 See base class version. 
 
 
 
 
 Reimplemented from AttributeValue. Definition at line 1448 of file txtattr.cpp. 01449 { 01450 // This must be at least a FillGeometryAttribute... 01451 ERROR3IF(!pAttr->IsKindOf(CC_RUNTIME_CLASS(TxtAspectRatioAttribute)), 01452 "Different attribute types in TxtAspectRatioAttribute::IsDifferent()"); 01453 01454 // Check they are NOT the same. 01455 return ( !(*((TxtAspectRatioAttribute *)pAttr) == *this) ); 01456 } 
  | 
  
      
  | 
  
| 
 Make a AttrTextFontTypeface node, see base class. 
 
 
 
 
 Reimplemented from AttributeValue. Definition at line 1499 of file txtattr.cpp. 01500 { 01501 // Create new attribute node 01502 AttrTxtAspectRatio* pAttr = new AttrTxtAspectRatio(); 01503 if (pAttr==NULL) 01504 // error message has already been set by new 01505 return NULL; 01506 01507 // Copy attribute value into the new node. 01508 pAttr->Value.SimpleCopy(this); 01509 01510 // Return the new node 01511 return pAttr; 01512 } 
  | 
  
      
  | 
  
| 
 Make the Attribute the same as the other. 
 
 
 
 
 Definition at line 1389 of file txtattr.cpp. 01390 { 01391 AspectRatio = Attrib.AspectRatio; 01392 return *this; 01393 } 
  | 
  
      
  | 
  
| 
 Comparison operator. See NodeAttribute::operator== for a description of why it's required. 
 
 
 
 
 
 Definition at line 1410 of file txtattr.cpp. 01411 { 01412 return (Attrib.AspectRatio == AspectRatio); 01413 } 
  | 
  
      
  | 
  ||||||||||||
| 
 Sets the TxtFontTypeface attribute for the given render region. 
 
 
 
 Implements AttributeValue. Definition at line 1352 of file txtattr.cpp. 01353 { 01354 pRegion->SetTxtAspectRatio(this, Temp); 01355 } 
  | 
  
      
  | 
  ||||||||||||
| 
 Restores the TxtAspectRatioAttribute attribute for the given render region. 
 
 
 
 Implements TxtBaseClassAttribute. Definition at line 1371 of file txtattr.cpp. 01372 { 01373 pRegion->RestoreTxtAspectRatio(this, Temp); 01374 } 
  | 
  
      
  | 
  
| 
 See AttributeValue::SimpleCopy. 
 
 
 
 Implements AttributeValue. Definition at line 1427 of file txtattr.cpp. 01428 { 01429 ERROR3IF(!IS_A(pValue, TxtAspectRatioAttribute), 01430 "Invalid Attribute value passed to TxtAspectRatioAttribute::SimpleCopy"); 01431 // We may as well just use our assignment operator. 01432 *this = *((TxtAspectRatioAttribute*)pValue); 01433 } 
  | 
  
      
  | 
  
| 
 
  | 
  
 1.4.4