"offset"/"shrink-image" ability
Published on April 25, 2007 By Dr W - Fences Support In Docks
So that thing I was talking about in my post yesturday night about the previously-unalluded new feature? You may not have immediatly noticed it...and thats its point! The new feature is subtle and there to make tiled backgrounds on zooming docks finally practical. The problem with tiled backgrounds before, was that in most cases you needed really specific icons for them to look proper. Reason being, otherwise if the image was large, all it would do is cover up the background and you wouldn't really even see the tile at all, it'd just look like a big mess. The new ability of v1.9, for tabbed backgrounds you can now set a certain percent that the existing image should be shrunk and shifted.

**First before I start, for a reminder for skinners who may have read in SkinningTheDock file on making tabbed backgrounds...i highly highly highly recommend not using any special stretch/tile-boundries! E.g. leave out any "LeftWidth"/"TopHeight"/etc flags, and always stretch. Tiling/multiple-stretches/etc for tabbed backgrounds will seriously slow the performance of your tabbed background! Ok, now on with it


Consider the following:

[Tile]
Image=MyBackground.png
ResizeIconByPercent = 100;
OffsetIconByPercentX = 50;
OffsetIconByPercentY = 50;

These are the default settings, as if you entered nothing. (Other than the setting for "Image" of course, you have to set that yourself!). It says that the icon should be sized to 100% (dont resize down at all)...and with any difference in space (which there is none)...offset the icon by 50% of that amount both from the left (X) and top (Y)



For several tile skins I included with OD v1.9, I have something like this:

[Tile]
Image=MyBackground.png
ResizeIconByPercent = 80;
OffsetIconByPercentX = 40;
OffsetIconByPercentY = 40;

This tells ObjectDock to resize the icon down to 80% of its original size, and then offset it by 40% of the difference for both X and Y...so basically, just left and just up of it being centered.


Similarly....
[Tile]
Image=MyBackground.png
ResizeIconByPercent = 80;
OffsetIconByPercentX = 50;
OffsetIconByPercentY = 0;

Those lines tell ObjectDock to resize the original icon down to 80% of its original size, then center it horizontally, but don't move it at all vertically...so keep it top-aligned, but smaller and centered. You'll see this one in use in the HyperGrass skin.


For sake of comparison, take a look at these couple of screenshots and guess which one is v1.9 with an updated skin file, and which isn't






Anyways, subtle sure, but does it open things up for some cool stuff like you can see with the 'glass' and 'hyper grass' backgrounds? Definitely. Haven't gotten a chance to update the "skinning the dock" text file, but will be when we get the chance - hopefully this tutorial is enough for people who want to start making their tiled backgrounds rock. Enjoy

-Jeff Bargmann
ObjectDock Lead Developer

Comments
on Apr 25, 2007
Nice illustration Jeff.  Now it makes more sense!  Thanks!
on Apr 25, 2007
Very cool Jeff: now I must update all my tile backgrounds
on Apr 26, 2007
Big improvement & the reason I had stopped using tiled docks.

Thank You Jeff for all the improvements you have made to this program.

It's My Secret



on Apr 27, 2007
NOW I get it! Had no idea this is now possible to do so easily. Hmmm... Tiled docks again, now. Wonder how this'll work with various "hanger"-type tiles. Can't wait to try that. Thanks, Jeff. Brilliant! I like a clean DT, and with OD+ it's so easy to set up.. So many new tricks avail. now, it's like getting a new luxury car after running a beatup old heap. This just makes my PC.
on Apr 28, 2007
Hi

I have downloaded and installed the Objektdock 1.9, and it works very
fine, except the weather widget/gadget. The weather server can not locate
Copenhagen, Denmark, but there is no problem when I change it to Berlin, Germany.

In Vista sidebar gadet, the weather forecast is perfekt and in my own language,
so is there something missing in this version or what.???  

Regards

Kim B.
on Apr 28, 2007
The weather server can not locate Copenhagen, Denmark, but there is no problem when I change it to Berlin, Germany


Accuweather looks like it uses Copenhagen, Denmark (Staden Kobenhavn) but the docklet doesn't support it.

There is a whol other post about this problem and Stardock is working on it.
All will be well
on Apr 29, 2007
It's a shame that you can't use the resize and offset settings with non tiled dock backgrounds. There are a few glass shelf backgrounds that would also benefit from them.
on Apr 30, 2007
Awesome Jeff! Now if I can only get my 1.9 to work and I can try them out. Its one of the only reasons I never used tiles because they were always hidden. This is a great improvement!
on May 01, 2007
This is SWEEEEEEEEET! Now I don't have to manually size my icons down to make them sit proper. SWEEEEEEEEEEEEEEEEEEEEEEEEEEEET!  Also, now maybe more folks will use the tiles.
on May 02, 2007
canmandeco: I did look in to that, but it ended up being tricker / couldn't use the same system. For those it's going to have to perhaps be a percent also...but...percent of the height of the dock instead of % of height of the item. If you apply the same algorithm as with the tiles? Looks goofy We'll see about something for a v1.9x
on May 03, 2007
canmandeco: I did look in to that, but it ended up being tricker / couldn't use the same system. For those it's going to have to perhaps be a percent also...but...percent of the height of the dock instead of % of height of the item. If you apply the same algorithm as with the tiles? Looks goofy We'll see about something for a v1.9x


Thanks for your reply. It's such a great feature, I knew there must be a reason it was for tiles only. I'm looking forward to the next version.