Main Menu


Sponsored Links

  


  
  

Help - Image Objects

You can use SVG, EMF, PNG, JPG and GIF images in your Web Cartoon Maker movies. It is preferable to use SVG and EMF images, because both of them are vector formats and scaling such images does not influence on movie quality. Each image you use in movie should be an instance of class Image:

void Scene1 ()
{
Image Back ( "backgrounds/beach.svg" );
Back.SetVisible ();
}

File name in Image constructor can point to a file in online Web Cartoon Maker library (for example "backgrounds/beach.svg"), your local file (for example "c:\\myimage.jpg") or any online image (for example "http://www.mywebsite.com/myimage.png"). If image cannot be found or cannot be displayed because of unsupported format then no errors will be reported but no image will be displayed.

The default image is associated in constructor, but you can change the image associated with an object at any time using this function:

void Image::SetImage ( const string &sImage )

You can also retrieve the image currently associated with an image object

string Image::GetImage ()

You can also use all the IObject methods with images:

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 images 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