Basically, I want to be able to control which parts of image are being truncated by container by moving image inside of it. Yes, I can do it using x and y positions of the meter, but doing this dynamically would be much better.
EDIT: The preferred way of "moving the image" would be by y axis and using mousewheel scroll. Ideally, container should be always filled with image, so there won't be any blank parts caused by changed coordinates.
Well, you updated your post while I put together an example...
This code will show a 600x600 image from your 'Pictures' folder every 10 seconds.
It will be masked with a rectangle shape with 10 pixel rounded corners.
I also cropped your image display to show the 600 center pixels (doesn't change your image).
I added a copy of the mask meter shape to show a border.
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
; Selects a random image from your 'Pictures' folder every 10 seconds due to the UpdateDivder setting
[MeasureQuote]
Measure=Plugin
Plugin=QuotePlugin
PathName=%UserProfile%\Pictures\
UpdateDivider=10
[MeterMask]
Meter=Shape
; Meters used as a container will not be drawn. They are used as a "mask". The '10' controls the corner radius.
Shape=Rectangle 1,1,599,599,10
; Displays the image, crops the center 600 pixels of larger images, if smaller it displays it centered
; Left-click the image to select another one before the 10 seconds elapses
[MeterImage]
Meter=Image
MeasureName=MeasureQuote
Container=MeterMask
ImageCrop=-300,-300,600,600,5
LeftMouseUpAction=[!UpdateMeasure MeasureQuote]
; Just a border with an invisible fill color
[MeterBorder]
Meter=Shape
Shape=Rectangle 1,1,599,599,10 | Stroke Color 220,220,220,220 | Fill Color 0,0,0,0
Container=MeterMask
frame.gif
You do not have the required permissions to view the files attached to this post.
However the movement feels very laggy. Hence I have two questions:
1. Is it possible to just drag image inside container?
2. Is it possible to create a smooth scroll?
I've came to conclusion that hardcoding values would be easier for me, because I plan to keep multiple photo widgets on my desktop, therefore I have to duplicate my skin. Maybe it is possible to spawn multiple meter instances in the same skin, I dont know. Anyways, thanks, ecletic-tech!