This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import processing.pdf.*; | |
import java.util.Collection; | |
import java.util.Map; | |
float[] sizes; | |
float[] distortions; | |
float FREQUENCY = 5; | |
int mindiameter = 100; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern mod extra; | |
use extra::json::*; | |
/* | |
* This function manages to do absolutely no copying, which is pretty cool. | |
* | |
* "What are all those `'r`s?" you ask. Well, they're liftime parameters. They | |
* indicate how long something lasts (before it's freed). They can't change how | |
* long something lives for, they only allow you to tell the compiler stuff it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro_rules! handle_element( | |
($tag:expr, $string:expr, $ctor:ident, [], $type_id:expr) => ( () ); | |
($tag:expr, $string:expr, $ctor:ident, [ $($field:ident),* ], $type_id:expr, ) => ( | |
if eq_slice($tag, $string) { | |
let _element = ~$ctor { | |
parent: Element::new($type_id, ($tag).to_str()), | |
$( | |
$field: None | |
),* | |
}; |