Skip to content

Commit

Permalink
html image maps.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonegli committed Jan 22, 2013
1 parent 62b2ec4 commit 0107d88
Show file tree
Hide file tree
Showing 74 changed files with 750 additions and 319 deletions.
9 changes: 9 additions & 0 deletions XamlImageConverter.Exe/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public static void Main(string[] args) {
Console.Error.WriteLine(" (Usually the bin folder).");
Console.Error.WriteLine(" -p option: The path to the project. Used to resolve app relative paths.");
Console.Error.WriteLine(" -v option: Create logfiles.");
Console.Error.WriteLine(" -f option: Don't use separate AppDomain for each sourcefile.");
Console.Error.WriteLine(" Speeds up compilation but uses more memory.");
Console.Error.WriteLine(" -? option: Show this help text.");
a.Remove("-h");
a.Remove("help");
Expand Down Expand Up @@ -73,6 +75,12 @@ public static void Main(string[] args) {
a.Remove("-r");
}

bool useAppDomain = true;
if (a.Contains("-f")) {
useAppDomain = false;
a.Remove("-f");
}

bool log = false;
if (a.Contains("-v")) {
log = true;
Expand Down Expand Up @@ -135,6 +143,7 @@ public static void Main(string[] args) {
compiler.LibraryPath = libraryPath;
compiler.ProjectPath = projectPath;
compiler.RebuildAll = rebuildAll;
compiler.SeparateAppDomain = useAppDomain;
if (log) compiler.Loggers.Add(new FileLogger());
compiler.Compile(files);
}
Expand Down
15 changes: 10 additions & 5 deletions XamlImageConverter.Exe/src/MakeImages.xic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml">

<!--
<xic:Scene OutputPath="~/img">

<xic:Xaml Source="SkinBuilder.xaml"/>
Expand Down Expand Up @@ -80,7 +79,7 @@
<xic:Xaml Source="Card7.de.xaml" />
<xic:Snapshot File="Karte7.png" Dpi="1200" />
</xic:Scene>

<xic:Scene Source="Planet.psd" OutputPath="~/img">
<xic:Snapshot File="Planet.png" />
<xic:Snapshot File="Planet.xaml" />
Expand All @@ -101,13 +100,19 @@
<xic:Snapshot File="usa.map.xaml" />

<xic:ImageMap Image="usa.map.png" File="usa.map.html" ID="usa">
<Areas Elements="WA;OR;CA;AK;ID;NV;AZ;UT;MT;WY;CO;NM;TX;OK;KS;NE;SD;ND;MN;IA;MO;AR;LA;WI;IL;TN;MS;MI;IN;KY;AL;FL;GA;SC;NC;VA;WV;OH;PA;MD;NJ;NY;CT;MA;VT;NH;ME;RI;DE" onclick="alert('State %ID% clicked...');" style="cursor:help;"/>
<Areas Elements="WA;OR;CA;AK;ID;NV;AZ;UT;MT;WY;CO;NM;TX;OK;KS;NE;SD;ND;MN;IA;MO;AR;LA;WI;IL;TN;MS;MI;IN;KY;AL;FL;GA;SC;NC;VA;WV;OH;PA;MD;NJ;NY;CT;MA;VT;NH;ME;RI;DE" onclick="alert('State %ID% clicked...');" />
</xic:ImageMap>
</xic:Scene>
-->

<xic:Scene OutputPath="~/img" Theme="Aero">
<xic:Xaml>
<Canvas Width="500" Height="500" Background="White">
<Canvas Width="500" Height="500">
<Canvas.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="White" Offset="0"/>
<GradientStop Color="LightSteelBlue" Offset="1"/>
</LinearGradientBrush>
</Canvas.Background>
<Button x:Name="Button" Canvas.Top="240" Canvas.Left="210" Content="This is a button..." />
</Canvas>
</xic:Xaml>
Expand Down
74 changes: 47 additions & 27 deletions XamlImageConverter.Exe/src/MakeImages.xic.xaml.log
Original file line number Diff line number Diff line change
@@ -1,29 +1,49 @@
XamlImageConverter 3.4 by Chris Cavanagh & David Egli
MakeImages.xic.xaml:
Error 23 (108,45): Invalid content

Error 23 (113,14): Invalid content

Error 23 (114,43): Invalid content

Error 23 (115,54): Invalid content

MakeImages.xic.xaml:
Error 23 (108,45): Invalid content

Error 23 (113,14): Invalid content

Error 23 (114,43): Invalid content

Error 23 (115,54): Invalid content

Warning 2 (114,4): An internal error occurred

Object reference not set to an instance of an object.
at XamlImageConverter.Group.<get_CulturesString>b__4(Group g) in c:\Code\XamlImageConverter\XamlImageConverter\XamlCapture\Group.cs:line 35
at XamlImageConverter.Group.Setting[T](Func`2 f) in c:\Code\XamlImageConverter\XamlImageConverter\XamlCapture\Group.cs:line 92
at XamlImageConverter.Group.get_CulturesString() in c:\Code\XamlImageConverter\XamlImageConverter\XamlCapture\Group.cs:line 35
at XamlImageConverter.Group.get_Cultures() in c:\Code\XamlImageConverter\XamlImageConverter\XamlCapture\Group.cs:line 36
at XamlImageConverter.Snapshot.Save() in c:\Code\XamlImageConverter\XamlImageConverter\XamlCapture\Snapshot.cs:line 50
at XamlImageConverter.Group.Process() in c:\Code\XamlImageConverter\XamlImageConverter\XamlCapture\Group.cs:line 479
at XamlImageConverter.Compiler.Compile(DateTime Version, XElement config) in c:\Code\XamlImageConverter\XamlImageConverter\XamlCapture\Compiler.cs:line 275
Error 11 (79,4): Source file C:\Code\XamlImageConverter\XamlImageConverter.Exe\src\Card7.de.xaml not found.
Setting OS Theme to Aero
Created background_top_gradient.png (35 MB RAM used)
Created page_header_lft.png (36 MB RAM used)
Created page_header_ctr.png (37 MB RAM used)
Created page_header_rt.png (37 MB RAM used)
Created main_content_bkgd_lft.png (37 MB RAM used)
Created main_content_bkgd.png (37 MB RAM used)
Created main_content_bkgd_rt.png (38 MB RAM used)
Created animated-loader-filmstrip.jpg (5 frames, 41 MB RAM used)
Set
Copyright.Content=System.Windows.Controls.Button: Chris Cavanagh & johnshope.com
Created copyright_bar.png (41 MB RAM used)
Created copyright_bar_element.png (41 MB RAM used)
Created modified.page.png (43 MB RAM used)
Reset
Copyright.Content=Copyright © 2008 Chris Cavanagh
Created full.jpg (57 MB RAM used)
Created full.png (58 MB RAM used)
Created full.gif (60 MB RAM used)
Created Kaxaml.png (63 MB RAM used)
Created Kaxaml_film.gif (50 frames, 89 MB RAM used)
Created Planet.png (154 MB RAM used)
Created Planet.xaml (154 MB RAM used)
Created tux.xaml (140 MB RAM used)
Created tux.png (141 MB RAM used)
Error 31 (91,4): No element with name "test" found.
Created tuxpart.png (141 MB RAM used)
Created soccer.png (141 MB RAM used)
usa.map.png is up to date.
usa.map.xaml is up to date.
usa.map.html is up to date.
Created button.scene.png (142 MB RAM used)
Created button.png (142 MB RAM used)
Created full.xps (1 pages, 0.15 MB)
Created Kaxaml.xps (1 pages, 0.17 MB)
Created C:\Code\XamlImageConverter\XamlImageConverter.Exe\img\animated-loader.gif (20 frames, 158 MB RAM used)
Created C:\Code\XamlImageConverter\XamlImageConverter.Exe\img\Kaxaml.gif (100 frames, 158 MB RAM used)
Created page_header.pdf (2 pages, 0.14 MB)
Created page_header.ps (3 pages, 12.23 MB)
Created page_header.eps (1 pages, 0.23 MB)
Created full.eps (1 pages, 12.56 MB)
Created full.ps (1 pages, 12.56 MB)
Created full.pdf (1 pages, 0.23 MB)
Created Kaxaml.pdf (1 pages, 0.02 MB)
Created Kaxaml.eps (1 pages, 0.64 MB)
Created Kaxaml.ps (1 pages, 0.64 MB)
2 changes: 1 addition & 1 deletion XamlImageConverter.Exe/src/usa.map.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
<h1>The United States of America</h1>
<p>This map generated from <a href="https://en.wikipedia.org/wiki/Image:Map_of_USA_with_state_names.svg">"Map of USA with state names.svg"</a>.</p>
<img class="map" src="../img/usa.map.png" width="959" height="593" usemap="#usa" />
<map id="usa" name="usa" ID="usa" />
<map id="usa" name="usa" />
</body>
</html>
Loading

0 comments on commit 0107d88

Please sign in to comment.