changeset 86:91cc6e6a4db3

changed icon code to directly generate the pngs needed (for linux?)
author matthiasm
date Tue, 03 Dec 2013 17:06:23 +0000
parents ca570861c105
children c6603f0ddde5
files generateIcon.R icons/tony-128x128.png icons/tony-16x16.png icons/tony-22x22.png icons/tony-24x24.png icons/tony-32x32.png icons/tony-48x48.png icons/tony-64x64.png
diffstat 8 files changed, 19 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/generateIcon.R	Mon Dec 02 17:12:59 2013 +0000
+++ b/generateIcon.R	Tue Dec 03 17:06:23 2013 +0000
@@ -7,21 +7,23 @@
 x <- sin1 * w + sin2 * (1-w)
 
 pad <- 3
-lineWidth <- 15
-outlineWidth <- 20
-sz <- 200
 
-png("tonyLogoWave.png", width = sz, height = sz, bg="transparent")
-par(mar=c(0,0,0,0))
-plot(t, x, type='l', 
-     lwd=lineWidth*3, bty='n', xaxt='n', yaxt='n',
-     ylim = c(-pad, pitchDiff+pad) + c(1,-1)*0.1,
-     xlim = c(0, 8*pi) + c(1,-1)*0.1,
-     col="white")
-lines(t, x, 
-     lwd=lineWidth, col = "black")
-lines(c(0,0),c(-pad,pitchDiff+pad), lwd=outlineWidth, col = 'blue', lend=2)
-lines(c(0,0)+8*pi,c(-pad,pitchDiff+pad), lwd=outlineWidth, col = 'blue', lend=2)
-lines(c(0,8*pi),c(0,0)+pitchDiff+pad, lwd=outlineWidth, col = 'blue', lend=2)
-lines(c(0,8*pi),c(0,0)-pad, lwd=outlineWidth, col = 'blue', lend=2)
-dev.off()
\ No newline at end of file
+for (sz in c(16,22,24,32,48,64,128)) {
+  lineWidth <- 15 * sz/200
+  outlineWidth <- 20 * sz/200
+  png(sprintf("~/code/tonioni/icons/tony-%ix%i.png",sz,sz), width = sz, height = sz, bg="transparent")
+  par(mar=c(0,0,0,0))
+  plot(t, x, type='l', 
+       lwd=lineWidth*3, bty='n', xaxt='n', yaxt='n',
+       ylim = c(-pad, pitchDiff+pad) + c(1,-1)*0.1,
+       xlim = c(0, 8*pi) + c(1,-1)*0.1,
+       col="white")
+  lines(t, x, 
+        lwd=lineWidth, col = "black")
+  lines(c(0,0),c(-pad,pitchDiff+pad), lwd=outlineWidth, col = 'blue', lend=2)
+  lines(c(0,0)+8*pi,c(-pad,pitchDiff+pad), lwd=outlineWidth, col = 'blue', lend=2)
+  lines(c(0,8*pi),c(0,0)+pitchDiff+pad, lwd=outlineWidth, col = 'blue', lend=2)
+  lines(c(0,8*pi),c(0,0)-pad, lwd=outlineWidth, col = 'blue', lend=2)
+  dev.off()
+}
+
Binary file icons/tony-128x128.png has changed
Binary file icons/tony-16x16.png has changed
Binary file icons/tony-22x22.png has changed
Binary file icons/tony-24x24.png has changed
Binary file icons/tony-32x32.png has changed
Binary file icons/tony-48x48.png has changed
Binary file icons/tony-64x64.png has changed