Skip to content

Commit

Permalink
Fix a couple pretty retarded rasterize errors
Browse files Browse the repository at this point in the history
Also does a debug print of inkscape commands, because why not.
  • Loading branch information
JoshDreamland committed Feb 5, 2016
1 parent 7d782c0 commit 6ff2956
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rasterize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ for i in {0..3}; do
fi
roundbias=$((iconsz/2))
x=$(echo "scale=0; ($x)/1" | bc);
x=$(printf '%.0f\n' $x)
y=$(printf '%.0f\n' $y)
x=$(echo "scale=0; ($x)/$iconsz*$iconsz" | bc);
y=$(echo "scale=0; ($pageheight-(($y+$roundbias)/$iconsz*$iconsz)-$iconsz)/1" | bc);
x2=$((x+iconsz));
y2=$((y+iconsz));
echo inkscape "icons$style.svg" --export-id="$icon" --export-area="$x:$y:$x2:$y2" --export-id-only --export-png="$outname"
inkscape "icons$style.svg" --export-id="$icon" --export-area="$x:$y:$x2:$y2" --export-id-only --export-png="$outname"
done
done # style loop
Expand Down

0 comments on commit 6ff2956

Please sign in to comment.