It is currently December 5th, 2021, 6:05 pm

BITMAP split-screen album

Skins with graphics and animations
Unight
Posts: 19
Joined: November 20th, 2012, 5:12 am

BITMAP split-screen album

Post by Unight »

I use one bitmap get this split-screen effect.
ini file

Code: Select all

[rainmeter]
 Update=#update#
 dynamicwindowsize=1
 
[variables]
 imagepath="Your image folder"
 Bitmapdigits=5
 albumW=800
 albumH=400
 update=200
 
[Metadata]
 Author=UNIGHT
 Name=BITMAP split-screen album
 Version=1.0
 Information=The split screen album alternative approach, with a little simple Lua, when used to cancel the nail on the desktop to facilitate drag, and another set Click penetration present instance, you can do more special effects, such as changing Bitmapdigits value, or changing matrix 2d dynamic flip are simple things, you only need a little math, currently only supports a horizontal size> vertical size chart
 License=Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported
 
[measurescript]
 measure=script
 scriptfile=#currentpath#\bitmap.lua

 [calcupdate]
 Measure=Calc
 Formula=floor(1000*10/#update#)
 
[album]                                   
 Measure=plugin
 Plugin=quoteplugin
 Pathname=#imagepath#
 Filefilter=*.jpg;*.jpeg;*.png;*.bmp
 Subfolders=1
 UpdateDivider=[calcupdate]
 DynamicVariables=1
 
[albumbg]
 meter=Image
 w=#albumW#
 h=#albumH#
 SolidColor=66666666
 LeftMouseUpAction=!update
 
[albumhidden]
 Meter=image
 ImageAlpha=1
 Dynamicvariables=1
 
[logoimg]
 Meter=bitmap
 Measurename=measurescript
 Bitmapextend=1
 Bitmapframes=#Bitmapdigits#
 Bitmapdigits=#Bitmapdigits#
 Bitmapseparation=#Bitmapseparation#
 Antialias=1
 Dynamicvariables=1

[logoimgreflect]
 Meter=bitmap
 Measurename=measurescript
 Bitmapextend=1
 Bitmapframes=#Bitmapdigits#
 Bitmapdigits=#Bitmapdigits#
 Bitmapseparation=#Bitmapseparation#
 Antialias=1
 Dynamicvariables=1
lua file

Code: Select all

function Initialize()

	album=SKIN:GetMeasure('album')
	albumhidden=SKIN:GetMeter('albumhidden')
	albumH=SKIN:GetVariable('albumH')
	albumW=SKIN:GetVariable('albumW')
	Bitmapdigits=SKIN:GetVariable('Bitmapdigits')
	separationw=0
	io=0
	movedigits=0
	angleadd=0
	
end

function Update()

	if io==0 then
		io=1	
	elseif io==1 then
		separationw=separationw+20
		if separationw==100 then io=2 end
	elseif io==2 then	
		separationw=separationw-20
		if separationw==0 then io=1 end
	end	
	local measurereturn=0
	movedigits=movedigits+1
	
	for i=0,(Bitmapdigits-1) do
		measurereturn=measurereturn+math.pow(Bitmapdigits,i)*((Bitmapdigits-i-1+movedigits)%Bitmapdigits)
	end
	
	SKIN:Bang('[!updatemeter logoimg][!updatemeter logoimgreflect][!updatemeter albumhidden]')
	SKIN:Bang('!setvariable','Bitmapseparation',separationw)
	SKIN:Bang('!setoption','albumhidden','imagename',album:GetStringValue())
	SKIN:Bang('!setoption','logoimg','Bitmapimage',album:GetStringValue())
	SKIN:Bang('!setoption','logoimgreflect','Bitmapimage',album:GetStringValue())
	SKIN:Bang('[!updatemeter logoimg][!updatemeter logoimgreflect][!updatemeter albumhidden]')
	SKIN:Bang('!setoption','logoimg','Transformationmatrix',albumW/((Bitmapdigits-1)*separationw+albumhidden:GetW())..';0;0;'..albumH/albumhidden:GetH()..';0;0')
	SKIN:Bang('!setoption','logoimgreflect','Transformationmatrix',albumW/((Bitmapdigits-1)*separationw+albumhidden:GetW())..';0;0;-'..0.3*albumH/albumhidden:GetH()..';0;'..1.3*albumH)
	SKIN:Bang('[!updatemeter logoimg][!updatemeter albumhidden][!updatemeter logoimgreflect]')
	return measurereturn

end

User avatar
jsmorley
Developer
Posts: 22416
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: BITMAP split-screen album

Post by jsmorley »

Very interesting. Nice work. A tad CPU intensive of course, but quite clever.