I am writing a custom slider control, All its functionality is accounted for but now the aesthetics (which was the reason for writing it in the first place) has become problematic.
It starts with a custom class that converts true hls and rgb, thats 360 stops not 255. then I have a class that loops through all 360 stops and draws a vertical line on an image, this gives me a 360px wide hue rotation image.
I then create a new bitmap, and draw on it a rounded rectangle using a texture brush with the first image. So now I have 360px rounded rectangle image.
i draw this image on my control starting at 1/4 from the top and ending 1/4 from the bottom, so centered in my control is the rounded hue rotation image. I have the userpaint flags and the allow transparent backcolor flags set and the back color set to transparent. but since the parent control is a transparent panel, and behind that is an image, I get a gray box.
I need to fix this...
but why do I need the padding around my image, why not just cut the region and be done with it you say? glad you asked.
the 2nd problem that helps cause the first problem is the actual handle for the slider. the handle is a usercontrol that is custom drawn as well, it has rounded corners and a gloss, its color is depended on the value of the slider, and as it moves across the hue image it changes color accordingly. and the slider protrudes 1/4 the control above and below the image.
with that, i have the problem that its also transparent, but still has gray bounding box around the top of the arcs and lines down the side that cover up part of the hue image that is not intended.
so I guess my problem stands at, How do I create true transparency that spans 2,3 or possibly 4 controls?
or, is there another way to go about this?
I have developed an alternate route if I must take it, of creating a 2nd rounded rectangle and putting everything in it and giving up on the transparency. But i really don't want to do that.