-
One way you may want to try is to user tgif's internal commands and
see how far it goes. For example, if you want to create a solid
red circle centered at location (50,50) with radius 10, you can use
the following internal command:
set_selected_obj_color("red");
set_selected_obj_fill(1);
create_center_oval_obj(50,50,10);
set_selected_obj_fill(0);
The newly created object is placed on top of all the other objects.
You can select it and give this object a name:
select_top_obj();
add_attr_to_selected_obj("name","foo",50,50);
This object now has the name "!foo", where the "!" character
means top-level. To hide the "name" attribute of the "!foo"
object, you can do:
hide_attr("!foo.name");
If you want to create an outlined box, you can do:
set_selected_obj_color("blue");
set_selected_obj_fill(0);
create_box_obj(80,80,60,40);
To select it and rotate it by 45 degrees, you can do:
select_top_obj();
rotate_selected_obj(45);
You can feed all the above commands to tgif at the stdin by
starting tgif in the following way:
tgif -exec -
Of course, this is just a start. If you have more questions,
please send me e-mail.
By the way, the begin_animate() command just make things
look smoother and doesn't really start any animation.
|