|
|
878a2b |
#!/bin/bash
|
|
|
878a2b |
#
|
|
|
878a2b |
# svg_convertPngToKsplash.sh -- This function collects KDE splash
|
|
|
878a2b |
|
|
|
878a2b |
# them all together. Use this function as last-rendition action for
|
|
|
878a2b |
# KSplash base-rendition action.
|
|
|
878a2b |
#
|
|
|
03486a |
# Copyright (C) 2009, 2010, 2011, 2012 The CentOS Project
|
|
|
878a2b |
#
|
|
|
878a2b |
# This program is free software; you can redistribute it and/or modify
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
#
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
# General Public License for more details.
|
|
|
878a2b |
#
|
|
|
878a2b |
|
|
|
878a2b |
# along with this program; if not, write to the Free Software
|
|
|
878a2b |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
878a2b |
#
|
|
|
878a2b |
# ----------------------------------------------------------------------
|
|
|
878a2b |
# $Id$
|
|
|
878a2b |
# ----------------------------------------------------------------------
|
|
|
878a2b |
|
|
|
878a2b |
function svg_convertPngToKsplash {
|
|
|
878a2b |
|
|
|
878a2b |
local -a SRC
|
|
|
878a2b |
local -a DST
|
|
|
878a2b |
local FONT=''
|
|
|
878a2b |
local COUNT=0
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
d29d90 |
FONT=$(svg_getTTFont "DejaVuLGCSans-Bold")
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
78b0cb |
cli_checkFiles -e "$FONT"
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
SRC[0]="${OUTPUT}/splash_top.png"
|
|
|
878a2b |
SRC[1]="${OUTPUT}/splash_active_bar.png"
|
|
|
878a2b |
SRC[2]="${OUTPUT}/splash_inactive_bar.png"
|
|
|
878a2b |
SRC[3]="${OUTPUT}/splash_bottom.png"
|
|
|
878a2b |
SRC[4]="$(dirname $TEMPLATE)/Theme.rc"
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
78b0cb |
cli_checkFiles -e "${SRC[@]}"
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
DST[0]="${OUTPUT}/splash_top.png"
|
|
|
878a2b |
DST[1]="${OUTPUT}/splash_active_bar.png"
|
|
|
878a2b |
DST[2]="${OUTPUT}/splash_inactive_bar.png"
|
|
|
878a2b |
DST[3]="${OUTPUT}/splash_bottom.png"
|
|
|
878a2b |
DST[4]="${OUTPUT}/Theme.rc"
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
cli_printMessage "${OUTPUT}/Preview.png" --as-creating-line
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
convert -append ${SRC[0]} ${SRC[1]} ${SRC[3]} ${OUTPUT}/Preview.png
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
mogrify -draw 'text 6,295 "KDE is up and running."' \
|
|
|
878a2b |
-fill \
|
|
|
878a2b |
-font $FONT \
|
|
|
878a2b |
${OUTPUT}/Preview.png
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
cp ${SRC[4]} ${DST[4]}
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
cli_expandTMarkers "${DST[4]}"
|
|
|
878a2b |
|
|
|
878a2b |
}
|