The simplest method of messing with an imageset is simply to recolor an existing one, either by changing colors but keeping the 'style' or making sure whatever new things you create match the pixel positions of the previous.
But, that's no fun, right? :p
I'll go down to the most basic of cases that I can think of to demonstrate my problem.
Using the normal WindowsLook skin, let's say I want to change the 'Background' image defined in the imageset file.
Currently, this is defined as:
Code: Select all
<Image Name="Background" XPos="9" YPos="9" Width="2" Height="2" />
That area is a white area. It is an area inside a bigger white area, also. That is an important note.
Now, let's be wacky and say I want to make the background a navy blue. I find a free spot in my imageset image file, and I hunker down a single navy blue pixel. Let's say this pixel is at pixel coordinate 124x36.
I should then be able to redefine my Background as:
Code: Select all
<Image Name="Background" XPos="124" YPos="36" Width="1" Height="1" />
shouldn't I? I've got a single pixel, so it is 1x1, so width of 1 and height of 1. It is located at 124x36, so xpos=124, ypos=36.
But if I load up a test case, what I wind up with is that color in the upper left quadrant of whatever area; it is translucent. The other three quadrants are a translucent white. All quandrants blend together toward the center.
The solution is to surround that single pixel with itself, so that I now have a 3x3 square to let me use a 1x1 pixel for the background.
Is that a fine solution? Sure, for anything that stays a solid color. This doesn't help me when I'm trying to be 'fancy' though
What confuses me is that this behavior doesn't seem to occur on anything that is used as a 'static' image. What I mean is, anything that will not be stretched [discounting an actual resize of the entire window]. The close button, the slider bar, the arrows, the mouse cursors...
But that's not true entirely either. My normal button borders seem to work fine, but those are just re-colorations of what was already there. But I did see this same behavior of partial transparency on my button borders before, when I was placing the pixels at a different location and as a different size...
This behavior strikes me as odd, off the bat, but I am hoping there is just some odd setting or property or...something...that will change it to the expected behavior? Or is this behavior correct? If it is, why?