From 11:00 PM CST Friday, Feb 14th - 6:30 PM CST Saturday, Feb 15th, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why won't this fill with any color

i can draw on both pictures but on the second graphic i would like to fill with the color of my choosing but for some reason i can not
0 Kudos
Message 1 of 18
(3,877 Views)
I don't completely understand what you are trying to do.  One thing I noticed is that the program seems to run rather slowly.
 
I don't think lines are fillable items as individula entities.  I see you have a function in there called draw multiple lines which has the Fill button wired to it.  But there are no line coordinates going into it.  So I don't think that function is doing anything.
 
What I think you might have to do is build an array of endpoints, and only call that  draw multiple lines function once you do a mouse up and several endpoints have been accumulated.
Message 2 of 18
(3,854 Views)
basically what i want to do is, have one graphic where both graphics are drawn on but once i am done one graphic has what ever was drawn it and the other graphic has the same drawing but has some coloring filling it... sorry if this is had to make sense i think that is why im having difficulty with it
0 Kudos
Message 3 of 18
(3,828 Views)
One thing you'll need to do is separate your two picture controls.  They are both getting there data from the same shift register.  Create another shift register so that each picture has its own data.  You'll have to figure out how to get the fill multiple lines function to work.  Like I said before, that function doesn't look like it is working because no line endpoints are being fed into it.  I think you'll need to draw each individual line and accumulate the endpoints in an array (holding the array in a third shift register) during the mouse down and mouse move events.  When the mouse up event occurs, then feed that array of endpoints into the draw multiline function which only acts on the one picture and feed an empty array of endpoints to your shift register.
0 Kudos
Message 4 of 18
(3,822 Views)
ok so i separated the two graphics it but for some reason i am still unable to use the fill option. i've tried it two different ways for some reason my graphic disappears. i made another case structure for the mouse up option but still am having difficulty
0 Kudos
Message 5 of 18
(3,785 Views)
this is my program
Message 6 of 18
(3,782 Views)
<