Skip to content

Instantly share code, notes, and snippets.

View chriskoch's full-sized avatar

Christian Koch chriskoch

View GitHub Profile
@chriskoch
chriskoch / drawString.js
Created April 14, 2010 16:59
draw a multiline string in a html5 canvas element including rotation font fontsize and color
/*
* draw a multiline string rotated in a canvas
*
* @param ctx (M) context of the canvas
* @param text (M) string may contain \n
* @param posX (M) horizontal start position
* @param posY (M) vertical start position
* @param textColor color
* @param rotation in degrees (by 360)
* @param font must be installed on client use websafe
@chriskoch
chriskoch / gist:953290
Created May 3, 2011 13:04
schreibe in datei java
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
public class Uebung31 {
@chriskoch
chriskoch / getter-setter-traits.php
Created February 13, 2013 10:47
Using PHP 5.4 traits as getter and setter helper
<?php
trait Getters
{
/**
* calls Class::$name()
*
* @param string $name the name of a requested property
* @return mixed the result
*/