Sep 03, 2013, 9:30 AM
[CLOSED] changing already created sprite data from code behind
Hello
I ask myself a question since a while. I have solved it, but want to know it there is a better solution.
I my soft, I have to play with sprites to draw arrows (I make a "sort of" visio interface).
To create my sprites, I do something like that:
But, when I move process, I will have to change the path.
I use
is my DrawComponent and
my sprite name, but the only thing I'm able to do with that is to call the Remove method, and create a new sprites with modified path.
It works, but the question is :
is there a way to get all javascript sprite object and change only data needed to redraw it?
I ask myself a question since a while. I have solved it, but want to know it there is a better solution.
I my soft, I have to play with sprites to draw arrows (I make a "sort of" visio interface).
To create my sprites, I do something like that:
Dim mySpriteArrow As Sprite = New Sprite 'path sprite
With mySpriteArrow 'define arrow
.SpriteID = "myArrow" + ds.Tables("arrows").Rows(i).Item("ArrowID").ToString 'ID (myArrow1, myArrow2, ..., myArown
.Type = SpriteType.Path
.Path = NewPath
.Stroke = "#3457B6"
.StrokeWidth = 2
'.Fill = "#34ADB6" 'in case inner arrow must be filled
End With
drwVMProcess.Add(mySpriteArrow) 'add sprites to drawer
mySpriteArrow.Show(True) 'show it
All works fine. I have panels at start and en of arrow to simulate some process of course.But, when I move process, I will have to change the path.
I use
drwVMProcess.GetSprite(ArrowsToDealWith(i))
where
drwVMProcess
ArrowsToDealWith(i)
It works, but the question is :
is there a way to get all javascript sprite object and change only data needed to redraw it?
Last edited by Daniil; Sep 04, 2013 at 12:00 PM.
Reason: [CLOSED]