I am making a plugin that draws on the foreground and want to use a slider to modify values that affect what is drawn. Currently I am only able to get the drawing to update after clicking off of the context menu.
What is the best way to get the drawing to update as the slider is dragged?
I had tried that but for some reason it has no effect.
I am thinking it has to do with the way I am passing the slider information to the foreground method. For reference here is some of the code from inside the class:
And even thought I’m setting continuous to True it still doesn’t apply any change to the current path in Edit View. I haven’t used Glyphs.redraw() so far but maybe this could be an option in this case. I’m not sure how to make this work, though.
There are several was to cause a redraw. Either a value on a Glyphs object is changed and that triggers a redraw internally. Or, if the slider controls your values, then you have to call Glyphs.redraw()
Thanks @Mark, this is something I had realised a bit after posting this topic. Since I’m using AffineTransform to scale the current layer, now I’m dealing with other kind of issues such as having the original drawing as a reference of the 100% X and Y values. Now, every time I move a slider it resets the 100% of its width (for instance) to the new proportions (narrower or wider) instead of using the original one.