package sample.svg;
import static util.SVGUtil.*;

public class UseUnicode { //適宜ファイル名は修正のこと
    public static void main(String[] args) {
        int i;

        start();
        rulers();
        flowerSymbol("flower"); //花柄を呼び出すための規定

        fill(0xffff00);         //字の中心の塗りつぶし(文字色とあわせることを推奨)
        stroke(0x000ff);        //字の色を決定
        strokeWeight(1);
                        
        textFont("Verdana", 12);        //字のフォントを決定
        text("Kagawa", 25, 105);        //テキスト文章
        text("Univ.", 33, 120);
        text("Kagawa", 122, 102);
        text("Lab.", 135, 117);
        text("Open", 222, 102);
        text("Campus", 222, 117);
                
        noStroke();
        translate(48, 105);     //図形を(x,y)だけ平行移動 ここでは48,105
        for (i=0; i<12; i++) {                                          //左側の図形を描写　iは枚数
            fill(hsb1((i*2)/29.0, 1, 1));                       //図形の色(花)
            pushMatrix();
            rotate(i*PI/6);                                                     //図形(花)の位置を調整
            text("&#x1f43b;", 33, 0);                           //字の描画
            popMatrix();
        }

        translate(200, 0);
        for (i=0; i<24; i++) {                                          //右側の図形を描写
            fill(hsb1((i*2)/29.0, 1, 1));
            pushMatrix();
            rotate(i*PI/12);                                                            //図形(花)の位置を調整
            text("&#x1f43c;", 0, 45);                           //字の描画
            popMatrix();
        }

        translate(-100, 0);
        for (i=0; i<18; i++) {                                          //真ん中の図形を描写
            fill(hsb1((i*2)/29.0, 1, 1));
            pushMatrix();
            rotate(i*PI/9);                                                     //図形(花)の位置を調整
            text("&#x1f427;", 26, 30);                          //字の描画
            popMatrix();
        }

        finish();               
        return;
    }
}
