Setting up the slider is very easy since it has few functions.

length = 125; // length of the slider in pixels
horizontal = true; // horizontal or vertical slider (false)
c = [track, bar, button, arrow]; // colors
s = [raise, angle]; // styling options

One of width and height is set as length, the other one is fixed at 19 pixels.
I think the easiest way to implement is assume a vertical slider when the user draws a rectangle where height > width and a horizontal otherwise.
You can draw the component on screen with one dimension fixed to 19 pixels and the other one the width or height of the drawn rectangle.
c and s arrays speak for themselves since you used these before.

I implemented the slider to only use integer values (negative or positive) to make things less complicated. If you wish I can explain all problems when using decimal values or you can just take it for knowledge. When the user would want a range of -0.5 to 9.5 he simply could set min and max to -5 and 95 and divide the getValue() by 10.
