Main Menu


Sponsored Links

  


  
  

Tutorial - Image Objects

You already know that it is possible to use image objects in your cartoons. These could be images from our online library, images from the web or images from your hard drive. Here is an example of each image type declaration:

void Scene1 ()
{
    // Declare an image from your hard drive. 
    // Please make sure the image actually exist
    // Please specify full path to another image if it does not exist
    Image MyBackgroundImage ( "c:\\windows\\web\\wallpaper\\autumn.jpg" );

    // Declare an image from our online library
    Image MyCarImage  ( "vehicles/sedan.svg" );

    // Declare an image using full web URL
    Image MyLogoImage ( "http://www.webcartoonmaker.com/wcm_logo_icon.png" );

    // Lets make these images to appear at correct places
    MyBackgroundImage.SetPos ( 0, 0 );
    MyBackgroundImage.SetVisible ();
    MyCarImage.SetPos ( 0, 150 );
    MyCarImage.SetVisible ();
    MyLogoImage.SetPos ( 350, -250 );
    MyLogoImage.SetVisible ();
}

Images do not have any specific methods to work with them. But you can use methods common for all kinds of objects to move, rotate, scale them and do other operations. We are going to make the car to disappear in this tutorial:

  1. Copy and paste the following script to Web Cartoon Maker
    void Scene1 ()
    {
        // Declare an image from your hard drive. 
        // Please make sure the image actually exist
        // Please specify full path to another image if it does not exist
        Image MyBackgroundImage ( "c:\\windows\\web\\wallpaper\\autumn.jpg" );
    
        // Declare an image from our online library
        Image MyCarImage  ( "vehicles/sedan.svg" );
    
        // Declare an image using full web URL
        Image MyLogoImage ( "http://www.webcartoonmaker.com/wcm_logo_icon.png" );
    
        // Lets make these images to appear at correct places
        MyBackgroundImage.SetPos ( 0, 0 );
        MyBackgroundImage.SetVisible ();
        MyCarImage.SetPos ( 0, 150 );
        MyCarImage.SetVisible ();
        MyLogoImage.SetPos ( 350, -250 );
        MyLogoImage.SetVisible ();
    
        // Make the car to disappear
        MyCarImage.ChangeTransparency ( 1, 3 );
    }
    
  2. Compile it, and preview in WCM Player

previous topic next topic

  
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