This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Masking VObject

Hi,

I am trying to create some template by using the multi layer viewer, and create of imangeVobject ready. The user may drag their photo onto the multi layer viewer to replace the "container" by using the hit test method.

Everything were fine until we plan to do some odd shape template. Please refer to the attached photo.

The only way i could think of now is, creating some mask, so that the add shape will be replaced by transparent image.

But, we are facing the problem with
1. The hit test won't work well anymore, as they may drag something on top of the transparent layer, and replace the wrong VObject.

2. The user still able to resize the VObject, thus the preset mask might not run into proportional correctly.

Please advice.

Attachments

Hi,

Yeap, it is really interesting task! At a first glance I see only 2 possible ways.

1) You may try to use PolylineVObject together with System.Drawing.TextureBrush. You may turn off the feature of moving separate points, so it will be solid object with correct hit-test. But there are maybe some problems with the origin point of texture and with memory consumption.

2) Another way is to write custom vector object. In such case you will be absolutely free in implementation, but I think that it will be considerably complicated task.

And I wonder how you are going to specify such templates? They will be predefined in your application, or there will be some sort of special editor? (If you do not want to discuss these questions on forum - please submit case).