Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VML question

44 views
Skip to first unread message

Eli Smets

unread,
Jan 7, 2004, 12:52:37 PM1/7/04
to
We are currently working on a VML project.
The intention is to be able to draw template-shapes and save them in a
database for later use, using ASP.
When loaded into a project, these template-shapes need to be positioned and
resized on a photograph background using only the mouse.

Positioning is no problem, but we're having some difficulties resizing, more
specifically for VML groups.
We are able to drag-resize single objects, but the problem is that VML
drawings often consist of a number of grouped VML shapes.
When this is the case we should be able to drag-resize the entire group at
once.

For instance, how would we go about drag-resizing following drawing?

<v:group id="vgroup"
style='position: absolute;
left:35;top:35;
width: 200px;
height: 200px;
z-index: 1'
coordsize="200, 200">

<v:polyline name="r" id="r" style="position:absolute;left:50;top:50;"
points="0 0 220 18 220 255 0 255 0 0" strokeweight="1" strokecolor="yellow"
fillcolor="#012345" opacity="1.0" style="visibility: visible;">
</v:polyline>

<v:line id="vc3" style="position:absolute;left:50;top:50;" from="0 0"
to="220 18" strokeweight="5" strokecolor="#993322" fillcolor="#993322"
opacity="1.0" style="visibility: visible;">
</v:line>

<v:line id="vc1" style="position:absolute;left:50;top:50;" from="0 0" to="0
255" strokeweight="5" strokecolor="#993322" fillcolor="#993322"
opacity="1.0" style="visibility: visible;">
</v:line>

<v:line style="position:absolute;left:50;top:50;" coordorigin="0 0" from="0
255" to="220 255" id="vc4" strokeweight="5" strokecolor="#993322"
fillcolor="#993322" opacity="1.0" style="visibility: visible;">
</v:line>

<v:line style="position:absolute;left:50;top:50;" coordorigin="0 0" from="70
5" to="70 255" id="vc1" strokeweight="5" strokecolor="#993322"
fillcolor="#993322" opacity="1.0" style="visibility: visible;">
</v:line>

<v:line style="position:absolute;left:50;top:50;" from="145 10" to="145 255"
id="vc1" strokeweight="5" strokecolor="#993322" fillcolor="#993322"
opacity="1.0" style="visibility: visible;">
</v:line>

<v:line style="position:absolute;left:50;top:50;" from="220 15" to="220 255"
id="vc1" strokeweight="5" strokecolor="#993322" fillcolor="#993322"
opacity="1.0" style="visibility: visible;">
</v:line>

<v:line style="position:absolute;left:50;top:50;" from="0 100" to="220 110"
id="vc1" strokeweight="5" strokecolor="#993322" fillcolor="#993322"
opacity="1.0" style="visibility: visible;">
</v:line>

</v:group>

Thanks in advance.


vmlman

unread,
Jan 5, 2008, 11:07:36 PM1/5/08
to

Gee. I have no trouble with that. I pasted it into my vml program. I use the arrow keys to resize the group, but you could make it a mousemove event just as easy:

case 37 ' <-- move group left
g.style.posleft=g.style.posleft-30

case 40 ' move group up
if window.event.altkey=true then 'resize bigger
z=g.coordsize
z=split(z,",")
b=z(0)+100
if b=1000 then b=900
g.coordsize=b & "," & b

GSx=b/100:Gsy=GSx

else
g.style.postop=g.style.postop+30
end if

case 39 ' --> move group right
g.style.posleft=g.style.posleft+30

case 38 ' move group down
if window.event.altkey=true then 'resize smaller
z=g.coordsize
z=split(z,",")

b=z(0)-100
if b=0 then b=100
g.coordsize=b & "," & b

GSx=b/100:Gsy=GSx

else
g.style.postop=g.style.postop-30
end if

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities

0 new messages