![]() |
SkinMaster for WinAMP Announcement
1) Beta 20 Released 2) Region.txt 3) A note on the regions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1) Beta 20 Released http://www.skinmaster.co.uk/skinmaster I have been working on a new release of SkinMaster, another in a short period of time. In an attempt to make up for my lack of effort on the project recently I have added *REGION.TXT* tools into skinmaster. 2) Region.txt There is a new button on the main window, this will open a window that will allow you to load an image for each of the 4 shapable windows. Then you can chose your transparent colour and hit "Calculate". A second later, SkinMaster has created an optimised set of rectangles for your region. When you save skin (not components, only the full thing) the Region.txt file is automatically created for your viewing pleasure. 3) A quick note on the regions SkinMaster for winamp creates an optimised set of RECTANGLES to make the winamp regions. This may not seem as optimal as the shapes you can make with winamp BUT when it breaks down to it, the method WinAMP uses to make the region shapes is the windows API which can ONLY work with a set of rectangles. Because of this, I decided to create these rectangles directly, hopefully it will save winamp some processing. Mike ------------------ http://www.skinmaster.co.uk "My wife once got caught biting the heads off snails." FuckingBrit.Com |
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by THEMike:
In an attempt to make up for my lack of effort on the project recently I have added *REGION.TXT* tools into skinmaster. <HR></BLOCKQUOTE> http://forums.winamp.com/ubb/biggrin.gif Feelin' guilty? http://forums.winamp.com/ubb/biggrin.gif Yay! Region.txt tools! ------------------ Jayn http://forums.winamp.com/ubb/wink.gif WSD Skins [This message has been edited by Jayn (edited October 30, 2000).] |
The way Winamp's currently set up to deal with region.txt, can't it include half pixels? ie. if you want to do a 45-degree corner on the bottom-left of the Main window, you can set a line to go from, say, 106,0 to 116,10 and thus cut off the bottom-left corners of the pixels running across this gradient?
This would only make half a pixel difference to the result, but it still may be noticeable. Bleh. Bunch-o-rectangles region.txt support is better than none. I'm downloading it. http://forums.winamp.com/ubb/smile.gif ------------------ Yes™. http://www.iomegajaz.com -|- jaz@iomegajaz.com |
Further Dull Meanderings on Region
Ok, to make a window have a custom shape you have to use the following function: SetWindowRgn(hWnd,hRgn,bRedraw) Where hWnd is a handle to the window to shape, hRgn is a handle to a Region structure and bRedraw is a boolean, whether or not to redraw the window. WinAMP is constrained in that this is the only way to shape a window. Ok so we'll look into the hRgn part. <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR> typedef struct _RGNDATA { // rgnd RGNDATAHEADER rdh; char Buffer[1]; } RGNDATA; <HR></BLOCKQUOTE> So we have an buffer of letters, and a RGNDATAHEADER Ok to spare you any more excerpts from the win32 api, the RGNDATAHEADER defines how many characters there actually are in the buffer and what they represent. There is scope in the RGNDATAHEADER for future options for different shapes to be defined in the character buffer. But right now they have to be RECT structures, i.e. rectangles. So when you define your fancy pants shapes in region.txt by hand, poor old winamp has to redefine those shapes as a set of rectangles. So I save it the bother and go straight to rectangles. FYI I cheat in the code and actually use a bunch of windows API's to build a region structure from the image you load, and then read the structure out into winamps text file format. ------------------ http://www.skinmaster.co.uk "My wife once got caught biting the heads off snails." FuckingBrit.Com |
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by iomegajaz:
The way Winamp's currently set up to deal with region.txt, can't it include half pixels?<HR></BLOCKQUOTE> Being very careful with my reply here, knowing Jaz has some sarcasm in his humor: By definition, a pixel is literally the smallest unit in a digital picture. There is no such thing as a half-pixel. By playing tricks with colors, one can apparently, to the human eye, smooth out jagged lines (called anti-aliasing), but the pixels are still single and whole. Now, if you're drawing a diagonal, circular or whatever line, keep in mind that Mike's rectangles can be as small as 1x1 if need be. So, he may define things by rectangles, but those rectangles can be soooo small, as small as a pixel, you'll never notice. Let the computer do the thinking for you... http://forums.winamp.com/ubb/wink.gif ------------------ -- this space intentionally left blank -- |
Heh. Colour me (momentarily) stoopid. I forgot that pixels are what they are.
I realised that Mike's region cutter has the ability to makew 1x1 pixel boxes, but for some reason I forgot that pixels can't be halved. You may feel superior now. http://forums.winamp.com/ubb/biggrin.gif |
Mother Superior? I wouldn't want to feel her. She's old.
------------------ http://www.skinmaster.co.uk "My wife once got caught biting the heads off snails." FuckingBrit.Com |
Jaz;
Actually, I recognized your self-sacrificing move from the start. You obviously wanted to open a dialog on digital fundamentals to clarify things for any graphics newbies who might be lurking out there. Thanks for playing the straight man, you're a saint, man. Yeah, that's it... http://forums.winamp.com/ubb/smile.gif ------------------ -- this space intentionally left blank -- |
THEMike;
say, obviously region.txt doesn't handle alpha channels. But is that something that could change with WA3? Or is lack of support a Windows issue? ------------------ -- this space intentionally left blank -- |
What do you mean alpha channels?
Winamp works with a coord definition, SkinMaster creates that from a bitmap. The reason WinAMP works with a bitmap is because that's all you can draw directly onto a canvas (sensibly). If it did support images with AlphaChannels then people would have to use a powerful paint app to create them, this way they don't need to decode a bizare format, and they don't need people to buy expensive graphics soft. ------------------ http://www.skinmaster.co.uk "My wife once got caught biting the heads off snails." FuckingBrit.Com |
You pretty much answered my question, thanks
By alpha channels, I meant a grey-scale bitplane that lets you define the amount of transparency each pixel has. Thus smoothing the windows edges. ------------------ -- this space intentionally left blank -- |
Yeah I guessed as much but I wasn't sure that's what you meant since to me that's obviously not a realistic possibility.
------------------ http://www.skinmaster.co.uk "My wife once got caught biting the heads off snails." FuckingBrit.Com |
| All times are GMT. The time now is 08:22. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.