Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
mzhao  
#1 Posted : Friday, September 10, 2010 5:11:12 AM(UTC)
mzhao

Rank: Advanced Member

Groups: Member
Joined: 9/10/2010(UTC)
Posts: 57

Thanks: 1 times
We want to do image animation by customizing ImageVObject or VObject.

We plan to use a list of Images and dynamically redraw each image at a time interval of a timer to create animation effect.

We tried to customize ImageVObject and VObject but did not do it successfully.

The problem : when overriding Draw Method for our customized object, the instance created on mutipleLayerViewer does not have all those supporting actions: drag, resize, rotate, etc. Hence, the instance can not be editted.

Any recommandation how to implment animation, using Customizing ImageVObject or VObject ?

Our situation decides that we can not use animated gif.

We want the customizing object to animate at one time and not animate at another time, depending on a particular property value of the object.
Dmitry.Obukhov  
#2 Posted : Sunday, September 12, 2010 8:09:51 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Ming,

Could you provide me with additional information on your application? As far as I understand, you want to add an image on the multilayer viewer and then replace this image with new one using some animate effects. Please give me example what animate effects you need? What do you want to get in the end? Should it be something like slide show or anything else?
It would be great if you provide me with the code of your application (if you have it).

Looking forward to your reply.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
mzhao  
#3 Posted : Monday, September 13, 2010 12:03:01 AM(UTC)
mzhao

Rank: Advanced Member

Groups: Member
Joined: 9/10/2010(UTC)
Posts: 57

Thanks: 1 times
Hello,

Yes, we want to use multilayer viewer as a graphic editor.

The graphic elements which we want to edit on this graphic editor include following:

1. static image, this is something like ImageVObject of Graphics Mill.
2. Animation, namely, a list of images which can be drawn at a time interval. This is something like animated gif of different frames. But we want to override draw method of ImageVObject or VObject
( Draw(System.Drawing.Rectangle renderingRect, System.Drawing.Graphics g, Aurigma.GraphicsMill.WinControls.ICoordinateMapper coordinateMapper) ) to draw a particular image in the image list.

E.G Here is a image list which consists of image1.png, image2. png, image3.png, image4.png .. image10.png

When we put this customized object on multilayer viewer, the image from image1.png is drawn just like a instance of ImageVObject. But if we change a property value of customized object, the image from other image file such image2.png , or image3.png, etc is drawn. When we redraw this image, we do not want to remove the customer object from multilayer viewer and reload it. Instead, we want to use the overrided draw method of the customized object to draw different images. If we redraw the image1, image2, image3, etc at a time interval, it can have animaition effect just like animiated gif. The only difference between aniamated gif and our customized object is that animated gif is a single file but our animated customer object has a list of image files. But our customized object handles drawing images by itself. Also our animated customized object has all the properties of ImageVObject such as resize, rotate, etc.

In sum, we want to override draw method VObject but still have all the properties of ImageVObject.

Hope, this explain what we want to do.
Thanks.

mzhao  
#4 Posted : Monday, September 13, 2010 4:53:07 AM(UTC)
mzhao

Rank: Advanced Member

Groups: Member
Joined: 9/10/2010(UTC)
Posts: 57

Thanks: 1 times
Hello, Dmitry,

It seems that we can do animation by overriding VObject draw method. (See attached sample test codes).

But here are some questions:

We can not edit the customerizing object we added on the Multiple-Layer Viewer. How can we do this so that we select it, rotate it and resize it on the Multiple_Layer Viewer just as ImageVObject.

Thanks.
File Attachment(s):
AnimationObjectDesigner.cs (3kb) downloaded 7 time(s).
AnimationObject.cs (6kb) downloaded 6 time(s).
Dmitry.Obukhov  
#5 Posted : Tuesday, September 14, 2010 5:38:27 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Ming,

We are working under your question now. I will let you know about the results as soon as we resolve it.
Sorry for inconvenience.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
mzhao  
#6 Posted : Tuesday, September 14, 2010 9:53:36 PM(UTC)
mzhao

Rank: Advanced Member

Groups: Member
Joined: 9/10/2010(UTC)
Posts: 57

Thanks: 1 times
Hello Dmitry, Appraciate it,
Alex Kon  
#7 Posted : Thursday, September 16, 2010 2:22:45 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Member
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello Ming,

As I can see in your code you removed some parts which are responsible for user actions. For example, your custom VObject have empty setter for Transform property while it is the fundamental property for all transformations, like resize & rotate.

If you want to create just AnimatedImageVObject, I recommend you to inherit your custom object from ImageVObject and:
1) Add timer and set of images as fields.
2) In timer handler change current image of the ImageVObject and call Update() after that.

There will be a little hack with second point: ImageVObject currently doesn't grant access to the displayed image. So, to get it, you will have to use reflection. You can find all related information and code snippets in this thread: Transforms and Filters on ImageVObjects.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.