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 java.io.File | |
import java.awt.Color | |
import java.awt.Graphics2D | |
import java.awt.BasicStroke | |
import java.awt.image.BufferedImage | |
import java.awt.geom.AffineTransform | |
import java.awt.geom.GeneralPath as Path | |
import javax.imageio.ImageIO | |
import java.util.ArrayList |
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
#include <Foundation/Foundation.h> | |
#include <cairo.h> | |
typedef struct { | |
float x; | |
float y; | |
} point_t; | |
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 Foundation; | |
@interface PngUtil : NSObject {} | |
@end | |
@implementation PngUtil | |
+ (CGContextRef) | |
contextWithWidth : (int)width | |
andHeight : (int)height { |
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 Foundation | |
import CoreFoundation | |
import CoreImage | |
let path = NSProcessInfo.processInfo().arguments[1] | |
let url:NSURL = NSURL(fileURLWithPath: path) as CFURLRef | |
let pdfDocument = CGPDFDocumentCreateWithURL(url) // CGPDFDocument | |
// |
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
def sb = new StringBuffer() | |
sb.append("""<html> | |
<body> | |
<table border=0 style="border-collapse: collapse;border:solid 1px;">""") | |
def cellW = 200 | |
def cellStyle0 = "width:${cellW}px;border-left:solid 1px #333;background-color:#eee;" |