Main Menu


Sponsored Links

  


  
  

Help - Text Objects

You can use text objects in your Web Cartoon Maker movies. Each text object in your movie should be an instance of class Text. Here is an example of Text object declaration:

void Scene1 ()
{
Text Intro ( "Web Cartoon Maker" );
Intro.SetVisible ();
}

You can use following methods to work with text objects:

void Text::SetText ( const string &sText )

You can use this method to change a text associated with object after current moment in scene. The default text is usually set in constructor but it can be changed at any time

void Text::SetFont ( const string &sFont )

You can use this method to change a text font after current moment in scene. You should supply valid Windows font name like "Arial"

void Text::SetStyle ( const string &sStyle )

You can use this method to change a text style after current moment in scene. You should supply a string which can include letters "B", "I", "U" and "S" responsible for bold, italic, underlined and stroke out styles accordingly

void Text::SetColor ( const string &sColor )

You can use this method to change a text color after current moment in scene. You should supply a string encoding color. Each of the Red Green and Blue components is encoded using hex value. For example if you want to set a green color you can supply "00FF00" value.

void Text::SetSize ( int iSize )

void Text::ChangeSize ( int iSize, double dDuration )

You can use this method to change a font size after current moment in scene. You should supply a Windows font size. If a Set... method is used and the font size of an object was explicitly set before then it is changed smoothly causing your text to increase or decrease in size similar to IObject::SetScale () method. If a Change... method is used then the font size is changing smoothly from its current value to a new value during dDuration seconds

string Text::GetText ()

This method returns a text currently associated with a text object.

string Text::GetFont ()

This method returns a currently assigned Windows font name.

string Text::GetStyle ()

This method returns a string with currently assigned font styles encoded: letters "B", "I", "U" and "S" are responsible for bold, italic, underlined and stroke out styles accordingly.

string Text::GetColor ()

This method returns a string with encoded text color at a current moment in the scene. Each of the Red Green and Blue components is encoded using hex value. For example string "00FF00" means green color.

int Text::GetColor ()

This method returns a current Windows font size for an object in the scene

You can also use all the IObject methods with text objects:

Help - Methods Derived from IObject

These methods can be used with any objects in your cartoons

void IObject::SetVisible ( int bVisible = true )

This method makes an object visible or invisible after the current moment in scene

void IObject::SetX ( double dX )
void IObject::SetY ( double dY )
void IObject::SetPos ( double dX, double dY )

These methods change an object position after the current moment in scene. If a position was explicitly set before, it will be changed smoothly causing your object to move

void IObject::SetAngle ( double dAngle )

This method sets an object angle after the current moment in scene. If it was explicitly set before, it will be changed smoothly causing your object to rotate

void IObject::SetXScale ( double dXScale )
void IObject::SetYScale ( double dYScale )
void IObject::SetScale ( double dScale )

These methods change an object size after the current moment in scene. If it was explicitly set before, it will be changed smoothly causing your object to increase or decrease in size. If parameter is greater than 1 an object will be bigger than original. If parameter is less than 1 an object will be smaller than original

void IObject::SetTransparency ( double dTransp )

This method changes an object transparency after the current moment in scene. Parameter between 0 and 1 is expected. 0 means that an object in not transparent at all. 1 means that and object is fully transparent and invisible. Any value between 0 and 1 makes and object semi-transparent. If this parameter was explicitly set before, it will be changed smoothly causing your object to appear or disappear

void IObject::SetMirror ( int bMirror )

This method can flip your object horizontally (when bMirror=true) and restore it back (when bMirror=false) after the current moment in scene.

int IObject::GetVisible ()

You can use this method to determine if an object is visible at a current moment in the scene. When it is visible true is returned. Otherwise false is returned

double IObject::GetX ()
double IObject::GetY ()

You can use these methods to determine an object coordinates at a current moment in the scene.

double IObject::GetAngle ()

You can use this method to determine an object angle at a current moment in the scene.

double IObject::GetXScale ()
double IObject::GetYScale ()

You can use these methods to determine an object scale factors at a current moment in the scene.

double IObject::GetTransparency ()

You can use this method to determine an object transparency at a current moment in the scene. The returned value is between 0 and 1. 0 means that an object in not transparent at all. 1 means that and object is fully transparent and invisible. Any value between 0 and 1 means that an object is semi-transparent

int IObject::GetMirror ()

You can use this method to determine if an object is flipped horizontally. When it is flipped true is returned. Otherwise false is returned

void IObject::ChangeX ( double dX, double dDuration )
void IObject::ChangeY ( double dY, double dDuration )
void IObject::ChangePos ( double dX, double dY, double dDuration )
void IObject::ChangeAngle ( double dAngle, double dDuration )
void IObject::ChangeXScale ( double dXScale, double dDuration )
void IObject::ChangeYScale ( double dYScale, double dDuration )
void IObject::ChangeScale ( double dScale, double dDuration )
void IObject::ChangeTransparency ( double dTransp, double dDuration )

These Change... methods are similar to their Set... analogs except they require duration parameter. They do following:

  1. Fix current value of a parameter (before changing it)
  2. Sleep for dDuration seconds
  3. Set a new parameter value

As a result of this you can easily change a parameter smoothly from its current value to a new value during dDuration numer of seconds. It is preferable to use these Change... functions instead of Set... in almost all cases unless you know what are you doing

You can also read the tutorial topic about using text objects in Web Cartoon Maker.

  
News

New Tales Animator Video by Alan Sturgess

Alan Sturgess shared an excellent video he made using Tales Animator! You can still download Tales Animator here. Unfortunately it is only available for Wi

...

Simple Online Character Designer

There is a prototype of simple online character designer available HERE. It is only a prototype, it does not contain many pieces yet but it can already generat

...

Book is updated

Now our book "Web Cartoon Maker: A Fun Way to Learn C++" is fully in synch with WCM 1.5! It is available for download and online reading HERE.

...

Web Cartoon Maker 1.5 is here!

Web Cartoon Maker 1.5 is finally here! You can download it HERE! Here is what was updated in version 1.5: Web Cartoon Maker Desktop Edition is now fully standal

...

read more news...


Poll