各取所需
- // Global
- $puts(coverheight,$sub(%_height%,65))
- $if($getpvar(coverWH),,$setpvar(coverWH,1))
- $ifgreater($get(coverheight),%_width%,
- $puts(coverX,30)
- $puts(coverY,30)
- $puts(coverW,$sub(%_width%,60))
- $puts(coverH,$get(coverW))
- ,
- $puts(coverY,30)
- $puts(coverH,$sub($get(coverheight),60))
- $puts(coverW,$get(coverH))
- $puts(coverX,$div($sub(%_width%,$get(coverH)),2))
- )
- $puts(backH,$get(coverH))
- $select($getpvar(coverWH),,
- $ifgreater($div($get(coverheight),7),$div(%_width%,8),
- $puts(coverW,$sub(%_width%,60))
- $puts(coverX,$div($sub(%_width%,$get(coverW)),2))
- $puts(coverH,$mul($div($get(coverW),8),7))
- $puts(coverY,$add($sub($get(backH),$get(coverH)),$get(coverY)))
- ,
- $puts(coverW,$add($div($get(coverW),7),$get(coverW)))
- $puts(coverX,$div($sub(%_width%,$get(coverW)),2))
- )
- ,
- $ifgreater($div($get(coverheight),3),$div(%_width%,4),
- $puts(coverW,$sub(%_width%,60))
- $puts(coverX,$div($sub(%_width%,$get(coverW)),2))
- $puts(coverH,$mul($div($get(coverW),4),3))
- $puts(coverY,$add($sub($get(backH),$get(coverH)),$get(coverY)))
- ,
- $puts(coverW,$add($div($get(coverW),3),$get(coverW)))
- $puts(coverX,$div($sub(%_width%,$get(coverW)),2))
- )
- ,
- $puts(coverW,$mul($div($get(coverW),10),7))
- $puts(coverX,$div($sub(%_width%,$get(coverW)),2))
- ,
- $puts(coverW,$mul($div($get(coverW),4),3))
- $puts(coverX,$div($sub(%_width%,$get(coverW)),2))
- )
- $puts(invertY,$add($add($get(coverY),$get(coverH)),5))
- // PerTrack
- //切换比例按钮
- $select($getpvar(coverWH),
- $button2( 5,5,0,0,58,11,
- '$imageabs2(,,0,,0,,0,0,/images\foo_Oj\button\coverWH.png,alpha-48)',
- '$imageabs2(,,58,0,0,,0,0,/images\foo_Oj\button\coverWH.png,)',
- PVAR:SET:coverWH:2,TOOLTIP:"专辑图片比例 - 1:1"),
- $button2( 5,5,0,0,58,11,
- '$imageabs2(,,0,11,0,,0,0,/images\foo_Oj\button\coverWH.png,alpha-48)',
- '$imageabs2(,,58,11,0,,0,0,/images\foo_Oj\button\coverWH.png,)',
- PVAR:SET:coverWH:3,TOOLTIP:"专辑图片比例 - 8:7"),
- $button2( 5,5,0,0,58,11,
- '$imageabs2(,,0,22,0,,0,0,/images\foo_Oj\button\coverWH.png,alpha-48)',
- '$imageabs2(,,58,22,0,,0,0,/images\foo_Oj\button\coverWH.png,)',
- PVAR:SET:coverWH:4,TOOLTIP:"专辑图片比例 - 4:3"),
- $button2( 5,5,0,0,58,11,
- '$imageabs2(,,0,33,0,,0,0,/images\foo_Oj\button\coverWH.png,alpha-48)',
- '$imageabs2(,,58,33,0,,0,0,/images\foo_Oj\button\coverWH.png,)',
- PVAR:SET:coverWH:5,TOOLTIP:"专辑图片比例 - 7:10"),
- $button2( 5,5,0,0,58,11,
- '$imageabs2(,,0,44,0,,0,0,/images\foo_Oj\button\coverWH.png,alpha-48)',
- '$imageabs2(,,58,44,0,,0,0,/images\foo_Oj\button\coverWH.png,)',
- PVAR:SET:coverWH:1,TOOLTIP:"专辑图片比例 - 3:4"))
- // Cover art ↓#############################################
- //判断是否存在专辑图片
- $if($fileexists($getpvar(coverPath1)),
- //专辑封面
- $imageabs2( $get(coverW),$get(coverH),
- ,,,,
- $get(coverX),$get(coverY),
- $getpvar(coverPath1),NOKEEPASPECT)
- ,
- //空封面
- $imageabs2( $get(coverW),$get(coverH),
- ,,,,
- $get(coverX),$get(coverY),
- /images\foo_Oj\bNocover.jpg,NOKEEPASPECT)
- )
- //反光效果
- $imageabs2( $get(coverW),$get(coverH),
- ,,,,
- $get(coverX),$get(coverY),
- /images\foo_Oj\overlay.png,alpha-100 NOKEEPASPECT)
- //灰白边缘
- $drawrect( $get(coverX),$get(coverY),$get(coverW),$get(coverH),
- brushcolor-null pencolor-204-204-204 alpha-120)
- //专辑倒影 ↓==========================
- $if($fileexists($getpvar(coverPath1)),
- $imageabs2( $get(coverW),$get(coverH),
- ,,,,
- $get(coverX),$get(invertY),
- $getpvar(coverPath1),rotateflip-6 NOKEEPASPECT alpha-192)
- ,
- $imageabs2( $get(coverW),$get(coverH),
- ,,,,
- $get(coverX),$get(invertY),
- /images\foo_Oj\bNocover.jpg,rotateflip-6 nokeepaspect alpha-192)
- )
- $drawrect( $get(coverX),$get(invertY),
- $get(coverW),$get(coverH),
- brushcolor-null pencolor-204-204-204 alpha-57)
- $imageabs2( $add($get(coverW),2),$add($get(coverH),1),
- ,,,,
- $sub($get(coverX),1),$get(invertY),
- images\foo_Oj\overlaytrsp.png,NOKEEPASPECT alpha-255)
- //专辑倒影 ↑==========================
- // Cover art ↑#############################################
- // Track Information ↓########################################
- $alignabs( 0,$add($get(coverY),$get(coverH)),
- %_width%,$sub(%_height%,$add($get(coverY),$get(coverH))),
- center,middle)
- $if(%_trackinfo_notrack%,
- $font($get(userFont),16,bold glow-102-102-102 glowexpand-1,220-220-220)
- No track
- ,
- $font($get(userFont),14,bold glow-153-153-153 glowexpand-1 glowalpha-160,220-220-220)
- %title%$char(10)
- $font(,11,bold glow-153-0-0 glowexpand-1 glowalpha-120,204-204-204)
- $if2(%artist%,%cwb_playinglist% #%cwb_playing_index%)$char(10)
- $font(,8,bold glow-153-153-192 glowexpand-1 glowalpha-96,153-153-153)
- -- $if2(%album%,%directoryname%) --$char(10)
- $font(,6,bold glow-153-153-192 glowexpand-1 glowalpha-96,153-153-153)
- [%date%]
- )
- // Track Information ↑########################################
- // Background
- //背景倒影 ↓==========================
- $drawrect( 0,$get(backH),
- %_width%,$sub(%_height%,$get(backH)),
- brushcolor-0-0-0 pencolor-null)
- $imageabs2( %_width%,$add(%_height%,56),
- 0,$sub($add(%_height%,56),$get(backH)),0,$div($get(backH),5),
- 0,$add($get(backH),4),
- $getpvar(background),rotateflip-6 nokeepaspect alpha-192)
- $drawrect( 0,$add($get(backH),4),
- %_width%,$div($get(backH),5),
- brushcolor-0-0-0 pencolor-$getpvar(backcolor) alpha-$getpvar(backalpha))
- $imageabs2( $add(%_width%,2),$add($div($get(backH),5),1),
- ,,,,
- -1,$add($get(backH),4),
- /images\foo_Oj\backtrsp.png,NOKEEPASPECT)
- //背景倒影 ↑==========================
复制代码
-
- // Global
- $if($fileexists($get(coverPath)),
- $puts(coverPath2,$get(coverPath)),
- $if($fileexists($replace(%path%,%filename_ext%,cover.*)),
- $puts(coverPath2,$replace(%path%,%filename_ext%,cover.*)),
- $if($fileexists($replace(%path%,%filename_ext%,*.jpg)),
- $puts(coverPath2,$replace(%path%,%filename_ext%,*.jpg)),
- $puts(coverPath2,$replace(%path%,%filename_ext%,*.gif))
- )
- )
- )
- // Background
- $ifequal($getpvar(hSize),0,
- $drawrect(0,0,%_width%,%_height%,brushcolor-0-0-0 pencolor-192-192-192 alpha-80)
- $drawrect(93,26,$sub(%_width%,93),1,brushcolor-null pencolor-$getpvar(infocolor1))
- ,
- $drawrect(0,0,$sub(%_width%,1),%_height%,brushcolor-0-0-0 pencolor-192-192-192 alpha-80)
- $drawrect(93,26,$sub(%_width%,94),1,brushcolor-null pencolor-$getpvar(infocolor1))
- )
- $imageabs2(64,64,,,,,1,2,/images\foo_Oj\sNocover.png,NOKEEPASPECT)
- $imageabs2(64,64,,,,,1,2,$get(coverPath2),NOKEEPASPECT)
- $imageabs2(66,66,,,,,0,1,/images\foo_Oj\artoverlay.png,NOKEEPASPECT)
- $imageabs2(28,56,,,,,66,6,/images\foo_Oj\cd.png,NOKEEPASPECT)
- //Infomation
- $font($get(userFont),9,bold,$getpvar(infocolor2))
- $alignabs(88,4,$sub(%_width%,168),15,left,top)
- $if2($if2(%album artist%,%artist%),Unknown Artist)
- $if($stricmp($getpvar(fontcolor),black),
- $font(,10,bold,0-5-0),
- $font(,10,bold,255-250-255))
- $alignabs(94,34,$sub(%_width%,94),16,left,top)
- $if2(%album%,Unknown Album)
- $font(,,bold,$getpvar(infocolor3))
- ' '[%date%]
- $font(,7,bold,$getpvar(infocolor3))
- $alignabs(85,53,$sub(%_width%,155),11,left,top)
- [%codec%] - [%codec_profile%] [%bitrate% kb/s] - [%channels%]
- $font(,8,bold,$getpvar(infocolor4))
- $alignabs($sub(%_width%,84),6,80,13,right,top)
- $if2(%genre%,No Genre)
- $alignabs($sub(%_width%,74),51,70,13,right,button)
- %_itemcount% Track$ifgreater(%_itemcount%,1,s,)
复制代码 |