Odd it is. I already provide scaled icons. But, when I stepped thru the status pane paint manager code I saw CJ call to get the image from the pane. The call had no args. Inside the method, the call to the image manager passed in zero for the size. The image manager then retrieved the smallest icon I had set, which was 16x16.
Then the code wound thru the draw method and our icons are PNG so they have alpha and the CJ code called a GDI alpha blending API. I examined the API in the MSDN and the documentation said that half toning is not supported by the API. If it was a BMP file, CJ turns on half toning which helps the stretching of the image to a larger size.
In the latest CJ, I also found the code relies on a flag to indicate if the image should be resized whereas older code used the DPI macro on the icon width and height. We don't turn on the general resizing code because we process all our images thru WIC to resize them (both bmp and png) as WIC does a better job that the GDI half toning.
To address this I modified the code. I added a width parameter to the get image method
on the pane object and passed it to the image manager when the get image method called the image manager to find the icon. I modified the draw code and passed the rcItem.Width() to
the call the PM made. Then the image manager found my 20x20 icon and
returned it. At 200%, the rcItem width was 32 and the 32x32 icon was returned.
As for XAML, unfortunately we have found no tool that lets us create XAML. There are a lot of tools that create SVG. But, none of our image creators have found a cost free tool to convert SVG to XAML that worked when we tried to use the resulting image in CJ. I sure would like to know of a tool to create XAML, especially if there is one that converts SVG to XAML, that would work with CJ. We have to deal with multiple platforms (and non-CJ based software) and I can obtain SVG images from the company but not XAML. The claim is SVG is prolific and has become some sort of de-facto standard and why can't we just "use SVG like everyone else". I believe our image creators use an Adobe tool to create SVG.
At one time CJ was going to support SVG but then ... something happened and it never materialized? I was asked again just this week (coincidentally) when CJ would support SVG.
|