Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
2992d75
Added compile flags, and fixed boost dependencies (for 2019)
flindeberg Sep 2, 2019
ca2f437
Changed to std instead of boost
flindeberg Sep 2, 2019
8d6dca1
lite saker
flindeberg Sep 2, 2019
ce3b608
Prefix-fil
flindeberg Sep 2, 2019
1a52b41
Prefix AS combination cleaned and ready
flindeberg Sep 3, 2019
931c711
Added AS-AS mapping with weights, needs rev
flindeberg Sep 3, 2019
4ab56ad
Added reversed AS-AS mappings
flindeberg Sep 3, 2019
070a9c8
Added full merged ncol file for Internet 20190902, all announced ASpa…
flindeberg Sep 3, 2019
3566e60
Standard run
flindeberg Sep 3, 2019
4b0b33b
Added setup.cfg as example
flindeberg Sep 3, 2019
c91a75c
Added files with cleaned spaces
flindeberg Sep 3, 2019
aca8fb9
Remade full, issues with spaces
flindeberg Sep 3, 2019
a29b4bf
Merge branch 'master' of github.com:flindeberg/LGL
flindeberg Sep 3, 2019
5e0f573
Fixed newline at end
flindeberg Sep 3, 2019
c233b5d
Saving wip of ncol
flindeberg Sep 3, 2019
f13437c
Saving wip of ncol
flindeberg Sep 3, 2019
ca6c28f
Saving wip of ncol
flindeberg Sep 3, 2019
364fd2b
Internet full ncol should be clean, starts running
flindeberg Sep 3, 2019
4f0bae8
Generation of entire internet
flindeberg Sep 3, 2019
50f4644
Chmod +x and testable script
flindeberg Sep 3, 2019
86bf57d
Lite ändringar
flindeberg Sep 3, 2019
fc767dc
Started on parsing script
flindeberg Sep 3, 2019
12f80e9
Added basic structure for bootstrapping. Still has some issues but sh…
flindeberg Sep 3, 2019
7dd80ce
Fixed some issues with run.sh (threadcount)
flindeberg Sep 3, 2019
878e5ff
Fixed color-file
flindeberg Sep 3, 2019
26a9fee
Added image of the Internet
flindeberg Sep 3, 2019
84b4f4f
Added image
flindeberg Sep 3, 2019
d2d5ba7
Improved default values in bootstrapping run for Internet map generation
flindeberg Sep 3, 2019
468d509
Added creategraphfromurl.sh and modified bootstrap and run accordingl…
flindeberg Sep 3, 2019
ec0f92e
Update and rename README.txt to README.md
flindeberg Sep 3, 2019
7225d9c
Update README.md
flindeberg Sep 3, 2019
89df685
Merge branch 'master' of github.com:flindeberg/LGL
flindeberg Sep 3, 2019
ae2adfd
Updated scripts to better handle image generation
flindeberg Sep 3, 2019
a4a1633
Added example urls for dumps, use with xargs and creategraphfromurl
flindeberg Sep 3, 2019
8d81e5c
Update README.md
flindeberg Sep 3, 2019
cf9f29b
Fixed colors to blue greenish tint (late commit)
flindeberg Sep 3, 2019
4a1a8bd
Merge branch 'master' of github.com:flindeberg/LGL
flindeberg Sep 3, 2019
3e130a7
Update README.md
flindeberg Sep 3, 2019
75b59ca
Update README.md
flindeberg Sep 3, 2019
76a6d0c
Set theme jekyll-theme-minimal
flindeberg Sep 3, 2019
392465e
Update README.md
flindeberg Sep 3, 2019
529fb4e
Merge branch 'master' of github.com:flindeberg/LGL
flindeberg Sep 3, 2019
7893ec6
Removed unneccessary testing data
flindeberg Sep 3, 2019
0e9521d
Fixed issues with duplicates and prefixes in some bgpdump-files
flindeberg Sep 3, 2019
23fbbe0
Fixed issue with color_file and autogeneration
flindeberg Sep 4, 2019
a240e46
Added example image 2016
flindeberg Sep 4, 2019
1524bdf
Added hard to get routing data
flindeberg Sep 4, 2019
184b453
Added dark green blue example (2001)
flindeberg Sep 4, 2019
4bcbb1f
Update README.md
flindeberg Sep 4, 2019
acd6712
Merge branch 'master' of github.com:flindeberg/LGL
flindeberg Sep 3, 2019
a891b80
Added some more Internet graphs
flindeberg Sep 4, 2019
3bd76a8
Update README.md
flindeberg Sep 4, 2019
2908df1
Merge branch 'master' of github.com:flindeberg/LGL
flindeberg Sep 4, 2019
d9d8cb2
Modified ImageMaker to produce both dark and light backgrounds. Used …
flindeberg Sep 5, 2019
46e7736
Merge branch 'master' of github.com:flindeberg/LGL
flindeberg Sep 5, 2019
38937d9
Added graphs for Internet 2000 - 2019
flindeberg Sep 5, 2019
217ca41
Watermarked light background
flindeberg Sep 5, 2019
a202293
Watermarked dark background graphs
flindeberg Sep 5, 2019
4c9e2e9
Added very simple makefile for java-code
flindeberg Sep 9, 2019
ab4919b
Updated ignore-file
flindeberg Sep 9, 2019
279be66
Update and rename main.yml to javajars.yml
flindeberg Sep 9, 2019
d8292f9
Update javajars.yml
flindeberg Sep 9, 2019
75e5b32
Update javajars.yml
flindeberg Sep 9, 2019
51fbbb0
Fixed issue with Makefile and github actions
flindeberg Sep 9, 2019
ed5cd04
Merge branch 'master' of github.com:flindeberg/LGL
flindeberg Sep 9, 2019
75f5b2e
Create gccbuild.yml
flindeberg Sep 9, 2019
7700c67
Update gccbuild.yml
flindeberg Sep 9, 2019
3136485
Simple Makefile fix
flindeberg Sep 9, 2019
86c5b42
Added automake and autoconf dependendencies
flindeberg Sep 9, 2019
10ae696
Update gccbuild.yml
flindeberg Sep 9, 2019
ab91eb2
Create testsimplegraph.yml
flindeberg Sep 9, 2019
49d6c74
Update testsimplegraph.yml
flindeberg Sep 9, 2019
0ea597f
Added configure
flindeberg Sep 9, 2019
26c552f
Adding build auxilaries
flindeberg Sep 9, 2019
6a45eac
Added Makefile.in
flindeberg Sep 9, 2019
5c35c28
Added another autoconf file (maybe I should have read the readme?)
flindeberg Sep 9, 2019
1b853ad
Another one
flindeberg Sep 9, 2019
a931a36
Removed old (pre-automake) makefile
flindeberg Sep 9, 2019
c4804f1
Fixed configure checking for boost-dependencies
flindeberg Sep 9, 2019
9231dcb
Update gccbuild.yml
flindeberg Sep 9, 2019
f207675
Update gccbuild.yml
flindeberg Sep 9, 2019
fde71d2
Added transparent images as well
flindeberg Sep 9, 2019
5b5691d
Merge branch 'master' of github.com:flindeberg/LGL
flindeberg Sep 9, 2019
a7f5b5e
Update README.md
flindeberg Apr 17, 2020
53416b1
Starting to fix eps export, currently compiles (functionality unknown)
flindeberg Aug 27, 2020
f3f5925
Added static makefile back
flindeberg Aug 28, 2020
ed28a31
Added vectorgraphics support, early, successfully generates eps, svg …
flindeberg Aug 28, 2020
0f8be7a
Added vectorgraphics changes to java-code
flindeberg Aug 28, 2020
8bda4d1
Additional cleanup
flindeberg Aug 28, 2020
b607666
Merge pull request #4 from flindeberg/fix_eps
flindeberg Aug 28, 2020
afb6c56
Added bitmaps back
flindeberg Aug 28, 2020
fea860a
Removed debug print and minor config changes
flindeberg Aug 28, 2020
b9b161c
Removed more debug print
flindeberg Aug 28, 2020
c072ec3
Merge pull request #5 from flindeberg/fix_eps
flindeberg Aug 28, 2020
49f0de5
Updated parsebview with support for multiple files (better?)
flindeberg Aug 31, 2020
ed195be
Added and modified scripts for easier download
flindeberg Aug 31, 2020
3971a02
Fixed issues with old scripts
flindeberg Aug 31, 2020
d5ad511
Fixed minor issues with bootstrapping
flindeberg Aug 31, 2020
34cba3b
Merge pull request #6 from flindeberg/fix_eps
flindeberg Aug 31, 2020
7d63ba1
Fixed minor issues and started to add generation of thesis images
flindeberg Sep 2, 2020
bdc3d74
Added minor optimizations
flindeberg Sep 2, 2020
a931dae
More minor optmizations
flindeberg Sep 2, 2020
b128ffb
Changing scripts to zsh where needed to get osx to run
flindeberg Sep 3, 2020
1d62cc2
working with zsh / bash issues
flindeberg Sep 3, 2020
8740be9
Use GNU version of commands where available, POSIX version do not wor…
flindeberg Sep 3, 2020
9de18bd
Merge pull request #7 from flindeberg/fix_eps
flindeberg Sep 4, 2020
b9725b4
Minor fixing for osx (still not running)
flindeberg Sep 4, 2020
2f2a097
Merge pull request #8 from flindeberg/fix_eps
flindeberg Sep 4, 2020
5deae06
Fixed some C-warnings
flindeberg Sep 4, 2020
715a26a
Minor bughunting with C-files
flindeberg Sep 4, 2020
3ac772f
Fixed naming
flindeberg Sep 4, 2020
0834da4
Fixed minor issues with graphing from date (incoming collision as well)
flindeberg Sep 7, 2020
57193aa
Fixed conflict
flindeberg Sep 7, 2020
51ba0fe
Merge branch 'fix_eps' of github.com:flindeberg/LGL into fix_eps
flindeberg Sep 7, 2020
165e8a9
Fixed duplicates in get_pairs (caused by blanket announces)
flindeberg Sep 7, 2020
6a501e1
Fixed minor issues with thesis graph generation, dry-run (2000-2002) …
flindeberg Sep 7, 2020
92f583b
Added script for getting data from ncol files
flindeberg Sep 8, 2020
756fccd
Minor edits
flindeberg Sep 8, 2020
f12bad3
Changed string yoga to python implementation
flindeberg Sep 8, 2020
4578a86
Update README.md
flindeberg Sep 9, 2020
a958d44
Changed old images into rrc00 folder
flindeberg Sep 14, 2020
47ddeea
Added new images based on multiple sources
flindeberg Sep 14, 2020
24eca86
Merge pull request #9 from flindeberg/fix_eps
flindeberg Sep 14, 2020
77751ed
Merge pull request #10 from flindeberg/master
flindeberg Sep 14, 2020
2a1dd27
Added basic build at build server
flindeberg Sep 15, 2020
e571dbe
Added short form
flindeberg Sep 15, 2020
6c6a057
Added vscode good enough workspace settings
flindeberg Sep 15, 2020
f0daf4e
Meaningful gitignore
flindeberg Sep 15, 2020
739038e
Meaninful makefiles for java, c and main dir
flindeberg Sep 15, 2020
53a1d2e
Updated readme for new make-files
flindeberg Sep 15, 2020
fa7e7d3
Updated jar-files with new build (should be the same technically)
flindeberg Sep 15, 2020
a9ebdef
Minor additions to .gitignore
flindeberg Sep 15, 2020
75f29ec
Merge pull request #11 from flindeberg/fix_eps
flindeberg Sep 15, 2020
5417cf2
Update javajars.yml
flindeberg Sep 15, 2020
7f713fe
Update testsimplegraph.yml
flindeberg Sep 15, 2020
a54f768
Update gccbuild.yml
flindeberg Sep 15, 2020
ff846e4
Create install.yml
flindeberg Sep 15, 2020
535fabb
Update install.yml
flindeberg Sep 15, 2020
2d33182
Removed old workflows
flindeberg Sep 15, 2020
2ceec20
Fixed worksflows?
flindeberg Sep 15, 2020
dcb04c5
Fixed boost dependency in workflows (?)
flindeberg Sep 15, 2020
e0058cd
Fixed boost package name
flindeberg Sep 15, 2020
06d8ba2
Fixed boost package name in ll places
flindeberg Sep 15, 2020
e4c57b7
Fixed typo
flindeberg Sep 15, 2020
0dd5e05
Added workflow dependency on zhs
flindeberg Sep 15, 2020
19a877b
Updated readme with github badge
flindeberg Sep 15, 2020
458231d
Added more dependencies to workflow
flindeberg Sep 15, 2020
e393bd3
Changed into two workflows, on failfast testrun, and one with rationa…
flindeberg Sep 15, 2020
d0b0391
Added second workflow testrun file
flindeberg Sep 15, 2020
b45b3a9
Fixed dependency typo in workflow
flindeberg Sep 15, 2020
64ada0e
Update README.md
flindeberg Sep 16, 2020
76086ec
Update README.md
flindeberg Sep 16, 2020
5c195ae
Create LICENSE
flindeberg Sep 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build and install CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
gcc-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: "Boost"
run: sudo apt install libboost-all-dev
- name: "Configure and make (C++)"
run: |
make -C src all

java-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: "Make one class-file"
run: |
echo "Making one class-file"
make -C Java src/ImageMaker/GenerateImages.class
- name: "Make jarfiles"
run: |
echo "Running java jarfiles"
make -C Java jarfiles
:

build:
runs-on: ubuntu-latest
needs: [java-build, gcc-build]
steps:
- uses: actions/checkout@v2
- name: "Install Boost"
run: sudo apt install libboost-all-dev
- name: make
run: make
- name: make install
run: make install
32 changes: 32 additions & 0 deletions .github/workflows/testrun.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Testrun CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Install Boost"
run: sudo apt install libboost-all-dev
- name: "Install other dependencies"
run: |
sudo apt install zsh bgpdump xz-utils
- name: "Install everything"
run: |
echo Running install
make install
- name: "Run a simple graph"
run: |
cd scripts
echo Trying to create graph
./creategraphfromdate.sh 2000 09
- name: Upload graph image
uses: actions/upload-artifact@v1
with:
name: Upload graph
path: testrun/bview_2000_09/bview_2000_09_transparent.png
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,15 @@ tags
/testrun/test-June-10/tmp
/testrun/test-June-10/*.tmp
/testrun/test-June-10/*.out
**/*.class
install_perl.log
**/*.Po
**/*.0
**/*.1
src/autom4te.cache
testrun/bview_*/
src/lglbreakup
src/lglfileconvert
src/lglayout
src/lglrebuild
**/*.pyx
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"cSpell.words": [
"Apthread",
"Jama",
"manip"
]
}
22 changes: 22 additions & 0 deletions Java/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

## Simple and stupid makefile

JAVAS=src/ImageMaker/GenerateImages.java src/Viewer2D/Edge.java src/Viewer2D/EdgesFrame.java src/Viewer2D/EdgesPanel.java src/Viewer2D/FileInputHandler.java src/Viewer2D/FindEdgesFrame.java src/Viewer2D/FindVertexFrame.java src/Viewer2D/FormatVertex.java src/Viewer2D/ManipVertexArray.java src/Viewer2D/SaveResults.java src/Viewer2D/Transformer.java src/Viewer2D/VertexDescripTable.java src/Viewer2D/VertexFitter.java src/Viewer2D/Vertex.java src/Viewer2D/VertexStats.java src/Viewer2D/Viewer2D.java src/Viewer2D/ViewerIO.java
CLASS=src/ImageMaker/GenerateImages.class src/Viewer2D/Edge.class src/Viewer2D/EdgesFrame.class src/Viewer2D/EdgesPanel.class src/Viewer2D/FileInputHandler.class src/Viewer2D/FindEdgesFrame.class src/Viewer2D/FindVertexFrame.class src/Viewer2D/FormatVertex.class src/Viewer2D/ManipVertexArray.class src/Viewer2D/SaveResults.class src/Viewer2D/Transformer.class src/Viewer2D/VertexDescripTable.class src/Viewer2D/VertexFitter.class src/Viewer2D/Vertex.class src/Viewer2D/VertexStats.class src/Viewer2D/Viewer2D.class src/Viewer2D/ViewerIO.class

jar/%.jar: $(CLASS)
jar uf $@ -C src .

jarfiles: jar/ImageMaker.jar jar/LGLLib.jar jar/LGLView.jar

%.class : %.java
javac -cp lib/Jama-1.0.3.jar:lib/VectorGraphics2D-0.13.jar src/Viewer2D/*.java src/ImageMaker/*.java

all: $(CLASS)

.PHONY: jarfiles

# Keeping for posterity
#%classfiles: src/ImageMaker/GenerateImages.java src/Viewer2D/Edge.java src/Viewer2D/EdgesFrame.java src/Viewer2D/EdgesPanel.java src/Viewer2D/FileInputHandler.java src/Viewer2D/FindEdgesFrame.java src/Viewer2D/FindVertexFrame.java src/Viewer2D/FormatVertex.java src/Viewer2D/ManipVertexArray.java src/Viewer2D/SaveResults.java src/Viewer2D/Transformer.java src/Viewer2D/VertexDescripTable.java src/Viewer2D/VertexFitter.java src/Viewer2D/Vertex.java src/Viewer2D/VertexStats.java src/Viewer2D/Viewer2D.java src/Viewer2D/ViewerIO.java
# javac -cp lib/Jama-1.0.3.jar:lib/VectorGraphics2D-0.13.jar src/Viewer2D/*.java src/ImageMaker/*.java
#.PHONY: classfiles jarfiles
4 changes: 2 additions & 2 deletions Java/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ cd ImageMaker
make clean
make
cd ..
$JAVABINPATH/jar cmf ImageMaker/META-INF/MANIFEST.MF imageMaker.jar Viewer2D Jama ImageMaker
jar cmf ImageMaker/META-INF/MANIFEST.MF imageMaker.jar Viewer2D Jama ImageMaker
echo "----- Compiling LGLView -----"
cd Viewer2D
make clean
make
cd ..
$JAVABINPATH/jar cmf Viewer2D/META-INF/MANIFEST.MF lglview.jar Viewer2D Jama
jar cmf Viewer2D/META-INF/MANIFEST.MF lglview.jar Viewer2D Jama
echo "There should be 2 .jar files in this directory"
Binary file modified Java/jar/ImageMaker.jar
Binary file not shown.
Binary file modified Java/jar/LGLLib.jar
Binary file not shown.
Binary file modified Java/jar/LGLView.jar
Binary file not shown.
Binary file added Java/lib/VectorGraphics2D-0.13.jar
Binary file not shown.
173 changes: 170 additions & 3 deletions Java/src/ImageMaker/GenerateImages.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.ArrayList;
Expand All @@ -30,6 +31,12 @@
import Viewer2D.EdgesPanel;
import Viewer2D.FormatVertex;
import Viewer2D.ViewerIO;
import de.erichseifert.vectorgraphics2d.Document;
import de.erichseifert.vectorgraphics2d.Processor;
import de.erichseifert.vectorgraphics2d.Processors;
import de.erichseifert.vectorgraphics2d.VectorGraphics2D;
import de.erichseifert.vectorgraphics2d.intermediate.CommandSequence;
import de.erichseifert.vectorgraphics2d.util.PageSize;

/**
* <b>SESS - 2014.05.10:</b>
Expand All @@ -53,6 +60,7 @@ public static void main(String[] args) {
int[] windowSizes = new int[2];
windowSizes[0] = new Integer(args[0]).intValue();
windowSizes[1] = new Integer(args[1]).intValue();
System.out.println("Loading flindeberg mod 2");
System.out.println("Image size is " + windowSizes[0] + " x "
+ windowSizes[1]);

Expand Down Expand Up @@ -100,14 +108,173 @@ public static void main(String[] args) {
}
System.out.println("Edges loading complete.");

generateDark(loadedEdgeColors, windowSizes, coordFiles, verterIO);

generateLight(loadedEdgeColors, windowSizes, coordFiles, verterIO);

generateTransparent(loadedEdgeColors, windowSizes, coordFiles, verterIO);

// System.out.println("Going for vector graphics (currently broken)");
// // Lets process coords files
// for (String coordFile : coordFiles) {
// try {
// System.out.println("Loading " + coordFile + "...");
// verterIO.loadVertexCoords(new File(coordFile));


// FormatVertex formatter = new FormatVertex(
// verterIO.getVertices(), verterIO.getStats(),
// windowSizes, 1);

// EdgesPanel panel = new EdgesPanel(verterIO.getEdges(),
// verterIO.getVertices(), windowSizes[0], windowSizes[1]);

// if (loadedEdgeColors)
// panel.addEdgeColors(verterIO.getEdgeColorMap());

// panel.showVertices(true);
// panel.setVisibilityTest(true);
// panel.setFormatter(formatter);
// panel.setEdgeColor(EDGE_COLOR);
// panel.setVertexColor(Color.white);
// panel.setBackgroundColor(new Color(0f,0f,0f,0f));

// // Use vector instead
// VectorGraphics2D g2 = new VectorGraphics2D();

// // Now the image has to be fitted to the given region
// panel.fitData();
// panel.writeVectorImage(g2);

// CommandSequence commands = ((VectorGraphics2D) g2).getCommands();

// String[] elements = {"pdf", "eps", "svg"};
// for (String ext : elements) {

// Processor pdfProcessor = Processors.get(ext);
// Document doc = pdfProcessor.getDocument(commands, PageSize.A4);

// String pngFile = MessageFormat.format(
// "{0}_{1,number,0}x{2,number,0}_transparent.{3}", coordFile,
// windowSizes[0], windowSizes[1], ext);

// System.out.println("Preparing " + pngFile + "...");
// try {
// doc.writeTo(new FileOutputStream(pngFile));
// } catch (Exception e) {
// System.out.println("Could not write vector graphics");
// }

// System.out.println("Done.");
// }


// } catch (IOException e) {
// System.out.println(MessageFormat.format(
// "Error processing {0}:\n{1}", e.getMessage()));
// }
// }
}

private static void generateTransparent(boolean loadedEdgeColors, int[] windowSizes, List<String> coordFiles,
ViewerIO verterIO) {
System.out.println("Going for transparent");
// Lets process coords files
for (String coordFile : coordFiles) {
try {
System.out.println("Loading " + coordFile + "...");
verterIO.loadVertexCoords(new File(coordFile));

String pngFile = MessageFormat.format(
"{0}_{1,number,0}x{2,number,0}_transparent.png", coordFile,
windowSizes[0], windowSizes[1]);
System.out.println("Preparing " + pngFile + "...");
FormatVertex formatter = new FormatVertex(
verterIO.getVertices(), verterIO.getStats(),
windowSizes, 1);

EdgesPanel panel = new EdgesPanel(verterIO.getEdges(),
verterIO.getVertices(), windowSizes[0], windowSizes[1]);

if (loadedEdgeColors)
panel.addEdgeColors(verterIO.getEdgeColorMap());

panel.showVertices(true);
panel.setVisibilityTest(true);
panel.setFormatter(formatter);
panel.setEdgeColor(EDGE_COLOR);
panel.setVertexColor(Color.white);
panel.setBackgroundColor(new Color(0f,0f,0f,0f));

BufferedImage bufferedImage = new BufferedImage(windowSizes[0],
windowSizes[1], BufferedImage.TYPE_INT_ARGB);

// Now the image has to be fitted to the given region
panel.fitData();
panel.writeImage(pngFile, bufferedImage);
System.out.println("Done.");
} catch (IOException e) {
System.out.println(MessageFormat.format(
"Error processing {0}:\n{1}", e.getMessage()));
}
}
}

private static void generateLight(boolean loadedEdgeColors, int[] windowSizes, List<String> coordFiles,
ViewerIO verterIO) {
System.out.println("Going for light");
// Lets process coords files
for (String coordFile : coordFiles) {
try {
System.out.println("Loading " + coordFile + "...");
verterIO.loadVertexCoords(new File(coordFile));

String pngFile = MessageFormat.format(
"{0}_{1,number,0}x{2,number,0}_light.png", coordFile,
windowSizes[0], windowSizes[1]);
System.out.println("Preparing " + pngFile + "...");
FormatVertex formatter = new FormatVertex(
verterIO.getVertices(), verterIO.getStats(),
windowSizes, 1);

EdgesPanel panel = new EdgesPanel(verterIO.getEdges(),
verterIO.getVertices(), windowSizes[0], windowSizes[1]);

if (loadedEdgeColors)
panel.addEdgeColors(verterIO.getEdgeColorMap());

panel.showVertices(true);
panel.setVisibilityTest(true);
panel.setFormatter(formatter);
panel.setEdgeColor(EDGE_COLOR);
panel.setVertexColor(Color.white);
panel.setBackgroundColor(Color.white);

BufferedImage bufferedImage = new BufferedImage(windowSizes[0],
windowSizes[1], BufferedImage.TYPE_INT_ARGB);

// Now the image has to be fitted to the given region
panel.fitData();
panel.writeImage(pngFile, bufferedImage);
System.out.println("Done.");
} catch (IOException e) {
System.out.println(MessageFormat.format(
"Error processing {0}:\n{1}", e.getMessage()));
}
}
}

private static void generateDark(boolean loadedEdgeColors, int[] windowSizes, List<String> coordFiles,
ViewerIO verterIO) {
System.out.println("Going for dark");
// Lets process coords files
for (String coordFile : coordFiles) {
try {
System.out.println("Loading " + coordFile + "...");
verterIO.loadVertexCoords(new File(coordFile));

String pngFile = MessageFormat.format(
"{0}_{1,number,0}x{2,number,0}.png", coordFile,
"{0}_{1,number,0}x{2,number,0}_dark.png", coordFile,
windowSizes[0], windowSizes[1]);
System.out.println("Preparing " + pngFile + "...");
FormatVertex formatter = new FormatVertex(
Expand All @@ -128,7 +295,7 @@ public static void main(String[] args) {
panel.setBackgroundColor(Color.BLACK);

BufferedImage bufferedImage = new BufferedImage(windowSizes[0],
windowSizes[1], BufferedImage.TYPE_INT_RGB);
windowSizes[1], BufferedImage.TYPE_INT_ARGB);

// Now the image has to be fitted to the given region
panel.fitData();
Expand All @@ -147,7 +314,7 @@ public static void message() {
+ "\t<width> <height> <edges file> <coords file1> <coords file2>... [-c <colors file> ]\n\n"
+ "If no colors file specified program will try to load file named \""
+ EDGE_COLOR_FILE + "\".\n"
+ "By default edges are white.");
+ "By default edges are white. flindeberg mod");
System.exit(1);
}

Expand Down
Loading