Merge branch 'feature/#182' into develop

This commit is contained in:
stubbfel
2013-09-02 11:13:17 +02:00
42 changed files with 164 additions and 6 deletions

View File

@@ -29,7 +29,18 @@
<Folder Include="dstImages\" />
<Folder Include="dstImages\wp8\" />
<Folder Include="dstImages\wp8\159x159\" />
<Folder Include="dstImages\wp8\159x159\functions\" />
<Folder Include="dstImages\wp8\159x159\DarkTheme\" />
<Folder Include="dstImages\wp8\159x159\DarkTheme\functions\" />
<Folder Include="dstImages\wp8\159x159\DarkTheme\emotions\" />
<Folder Include="dstImages\wp8\159x159\DarkTheme\listicons\" />
<Folder Include="dstImages\wp8\159x159\DarkTheme\others" />
<Folder Include="dstImages\wp8\159x159\DarkTheme\optionbuttons\" />
<Folder Include="dstImages\wp8\159x159\LightTheme\" />
<Folder Include="dstImages\wp8\159x159\LightTheme\functions\" />
<Folder Include="dstImages\wp8\159x159\LightTheme\emotions\" />
<Folder Include="dstImages\wp8\159x159\LightTheme\listicons\" />
<Folder Include="dstImages\wp8\159x159\LightTheme\others" />
<Folder Include="dstImages\wp8\159x159\LightTheme\optionbuttons\" />
<Folder Include="scripts\" />
<Folder Include="srcImages\" />
<Folder Include="srcImages\emotions\" />
@@ -39,7 +50,98 @@
<Folder Include="srcImages\others\" />
</ItemGroup>
<ItemGroup>
<Content Include="test.svg" />
<Content Include="dstImages\wp8\159x159\DarkTheme\emotions\attention.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\emotions\happy.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\emotions\question.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\emotions\sad.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\add.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\btu_account.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\call.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\campusplan.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\delete.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\down.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\edit.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\hausaufgaben.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\info.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\infopoint.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\lehrstuehle.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\links.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\mail.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\notenspiegel.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\openinghours.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\personen.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\reload.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\save.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\search.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\stundenplan.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\stundenplan_add.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\survey.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\termine.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\termine_add.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\up.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\vereine.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\functions\vorlesungsverzeichnis.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\listicons\exams.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\listicons\info.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\listicons\lab.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\listicons\lecture.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\listicons\practise.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\listicons\seminar.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\optionbuttons\add.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\optionbuttons\add_contact.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\optionbuttons\add_small.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\optionbuttons\delete.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\optionbuttons\edit.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\optionbuttons\prefs.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\optionbuttons\save.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\optionbuttons\search.png" />
<Content Include="dstImages\wp8\159x159\DarkTheme\others\beach_chair.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\emotions\attention.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\emotions\happy.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\emotions\question.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\emotions\sad.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\add.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\btu_account.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\call.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\campusplan.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\delete.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\down.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\edit.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\hausaufgaben.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\info.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\infopoint.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\lehrstuehle.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\links.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\mail.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\notenspiegel.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\openinghours.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\personen.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\reload.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\save.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\search.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\stundenplan.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\stundenplan_add.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\survey.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\termine.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\termine_add.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\up.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\vereine.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\functions\vorlesungsverzeichnis.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\listicons\exams.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\listicons\info.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\listicons\lab.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\listicons\lecture.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\listicons\practise.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\listicons\seminar.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\optionbuttons\add.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\optionbuttons\add_contact.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\optionbuttons\add_small.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\optionbuttons\delete.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\optionbuttons\edit.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\optionbuttons\prefs.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\optionbuttons\save.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\optionbuttons\search.png" />
<Content Include="dstImages\wp8\159x159\LightTheme\others\beach_chair.png" />
<Content Include="srcImages\emotions\attention.svg" />
<Content Include="srcImages\emotions\happy.svg" />
<Content Include="srcImages\emotions\question.svg" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1003 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@@ -10,11 +10,32 @@ def convertSVGToPNG(src, dst, dstWidth, dstHeight, srcWidth, srcHeight, style,la
for layer in root.findall('./{http://www.w3.org/2000/svg}g'):
name = layer.get('{http://www.inkscape.org/namespaces/inkscape}label')
if name != layerID :
root.remove(layer)
else :
if name in layerID :
for path in layer.findall('./{http://www.w3.org/2000/svg}path'):
path.set("style",style)
path.set("style",style)
else :
root.remove(layer)
img = cairo.ImageSurface(cairo.FORMAT_ARGB32, dstWidth, dstHeight)
ctx = cairo.Context(img)
width_ratio = float(dstWidth) / float(srcWidth)
height_ratio = float(dstHeight) / float(srcHeight)
ctx.scale(width_ratio, height_ratio)
handler= rsvg.Handle(None,str(ET.tostring(root, encoding='utf8', method='xml')))
handler.render_cairo(ctx)
img.write_to_png(dst)
def convertSVGToPNG2(src, dst, dstWidth, dstHeight, srcWidth, srcHeight, style,layerID):
ET.register_namespace("","http://www.w3.org/2000/svg")
tree = ET.parse(src)
root = tree.getroot()
for path in root.findall('./{http://www.w3.org/2000/svg}path'):
path.set("style",style)
img = cairo.ImageSurface(cairo.FORMAT_ARGB32, dstWidth, dstHeight)
ctx = cairo.Context(img)

View File

@@ -1,9 +1,44 @@
import IconCreator
import os
os.chdir("srcImages/functions")
for files in os.listdir("."):
if files.endswith(".svg"):
fileName, fileExtension = os.path.splitext(files)
IconCreator.convertSVGToPNG(files, "../../dstImages/wp8/159x159/LightTheme/functions/"+fileName+".png",159,159,256,256,"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" , "Icon")
IconCreator.convertSVGToPNG(files, "../../dstImages/wp8/159x159/DarkTheme/functions/"+fileName+".png",159,159,256,256,"fill:#FFFFFF;fill-opacity:1;fill-rule:evenodd;stroke:none", "Icon")
os.chdir("../../")
os.chdir("srcImages/emotions")
for files in os.listdir("."):
if files.endswith(".svg"):
fileName, fileExtension = os.path.splitext(files)
IconCreator.convertSVGToPNG(files, "../../dstImages/wp8/159x159/LightTheme/emotions/"+fileName+".png",159,159,256,256,"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" , "Emotion Speechbubble")
IconCreator.convertSVGToPNG(files, "../../dstImages/wp8/159x159/DarkTheme/emotions/"+fileName+".png",159,159,256,256,"fill:#FFFFFF;fill-opacity:1;fill-rule:evenodd;stroke:none", "Emotion Speechbubble")
os.chdir("../../")
os.chdir("srcImages/listicons")
for files in os.listdir("."):
if files.endswith(".svg"):
fileName, fileExtension = os.path.splitext(files)
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/LightTheme/listicons/"+fileName+".png",159,159,256,256,"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" , "Icon")
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/DarkTheme/listicons/"+fileName+".png",159,159,256,256,"fill:#FFFFFF;fill-opacity:1;fill-rule:evenodd;stroke:none", "Icon")
os.chdir("../../")
os.chdir("srcImages/optionbuttons")
for files in os.listdir("."):
if files.endswith(".svg"):
fileName, fileExtension = os.path.splitext(files)
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/LightTheme/optionbuttons/"+fileName+".png",159,159,256,256,"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" , "Icon")
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/DarkTheme/optionbuttons/"+fileName+".png",159,159,256,256,"fill:#FFFFFF;fill-opacity:1;fill-rule:evenodd;stroke:none", "Icon")
os.chdir("../../")
os.chdir("srcImages/others")
for files in os.listdir("."):
if files.endswith(".svg"):
fileName, fileExtension = os.path.splitext(files)
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/LightTheme/others/"+fileName+".png",159,159,256,256,"fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" , "Icon")
IconCreator.convertSVGToPNG2(files, "../../dstImages/wp8/159x159/DarkTheme/others/"+fileName+".png",159,159,256,256,"fill:#FFFFFF;fill-opacity:1;fill-rule:evenodd;stroke:none", "Icon")
os.chdir("../../")