From: Koichi KAMICHI Date: Tue, 24 Nov 2009 02:26:15 +0000 (+0000) Subject: Added new directory. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82eeff9640b753a0240e290e5c03f3e4af0d0d2f;p=chise%2Fkage.git Added new directory. --- diff --git a/engine/buhin.js b/engine/buhin.js index 02abd4b..f1cd8ba 100755 --- a/engine/buhin.js +++ b/engine/buhin.js @@ -8,6 +8,19 @@ function Buhin(number){ } Buhin.prototype.push = push; + function set(name, data){ // void + var temp = new Object(); + temp.name = name; + temp.data = data; + for(var i = 0; i < this.array.length; i++){ + if(this.array[i].name == name){ + this.array.splice(i, 1); + } + } + this.array.push(temp); + } + Buhin.prototype.set = set; + function search(name){ // string for(var i = 0; i < this.array.length; i++){ if(this.array[i].name == name){ diff --git a/engine/kage.js b/engine/kage.js index 49343c7..782a406 100755 --- a/engine/kage.js +++ b/engine/kage.js @@ -1,4 +1,4 @@ -function Kage(){ +function Kage(size){ // method function makeGlyph(polygons, buhin){ // void var glyphData = this.kBuhin.search(buhin); @@ -218,26 +218,48 @@ function Kage(){ this.kRate = 100; - this.kMinWidthY = 2; - this.kMinWidthT = 6; - this.kWidth = 5; - this.kKakato = 3; - this.kL2RDfatten = 1.1; - this.kMage = 10; - this.kUseCurve = 0; - - this.kAdjustKakatoL = ([14, 9, 5, 2]); // for KAKATO adjustment 000,100,200,300 - this.kAdjustKakatoR = ([8, 6, 4, 2]); // for KAKATO adjustment 000,100,200,300 - this.kAdjustKakatoRangeX = 20; // check area width - this.kAdjustKakatoRangeY = ([1, 19, 24, 30]); // 3 steps of checking - this.kAdjustKakatoStep = 3; // number of steps - - this.kAdjustUrokoX = ([24, 20, 16, 12]); // for UROKO adjustment 000,100,200,300 - this.kAdjustUrokoY = ([12, 11, 9, 8]); // for UROKO adjustment 000,100,200,300 - this.kAdjustUrokoLength = ([22, 36, 50]); // length for checking - this.kAdjustUrokoLengthStep = 3; // number of steps - this.kAdjustUrokoLine = ([22, 26, 30]); // check for crossing. corresponds to length - + if(size == 1){ + this.kMinWidthY = 1.2; + this.kMinWidthT = 3.6; + this.kWidth = 3; + this.kKakato = 1.8; + this.kL2RDfatten = 1.1; + this.kMage = 6; + this.kUseCurve = 0; + + this.kAdjustKakatoL = ([8, 5, 3, 1]); // for KAKATO adjustment 000,100,200,300 + this.kAdjustKakatoR = ([4, 3, 2, 1]); // for KAKATO adjustment 000,100,200,300 + this.kAdjustKakatoRangeX = 12; // check area width + this.kAdjustKakatoRangeY = ([1, 11, 14, 18]); // 3 steps of checking + this.kAdjustKakatoStep = 3; // number of steps + + this.kAdjustUrokoX = ([14, 12, 9, 7]); // for UROKO adjustment 000,100,200,300 + this.kAdjustUrokoY = ([7, 6, 5, 4]); // for UROKO adjustment 000,100,200,300 + this.kAdjustUrokoLength = ([13, 21, 30]); // length for checking + this.kAdjustUrokoLengthStep = 3; // number of steps + this.kAdjustUrokoLine = ([13, 15, 18]); // check for crossing. corresponds to length + } else { + this.kMinWidthY = 2; + this.kMinWidthT = 6; + this.kWidth = 5; + this.kKakato = 3; + this.kL2RDfatten = 1.1; + this.kMage = 10; + this.kUseCurve = 0; + + this.kAdjustKakatoL = ([14, 9, 5, 2]); // for KAKATO adjustment 000,100,200,300 + this.kAdjustKakatoR = ([8, 6, 4, 2]); // for KAKATO adjustment 000,100,200,300 + this.kAdjustKakatoRangeX = 20; // check area width + this.kAdjustKakatoRangeY = ([1, 19, 24, 30]); // 3 steps of checking + this.kAdjustKakatoStep = 3; // number of steps + + this.kAdjustUrokoX = ([24, 20, 16, 12]); // for UROKO adjustment 000,100,200,300 + this.kAdjustUrokoY = ([12, 11, 9, 8]); // for UROKO adjustment 000,100,200,300 + this.kAdjustUrokoLength = ([22, 36, 50]); // length for checking + this.kAdjustUrokoLengthStep = 3; // number of steps + this.kAdjustUrokoLine = ([22, 26, 30]); // check for crossing. corresponds to length + } + this.kBuhin = new Buhin(); return this; diff --git a/engine/kagecd.js b/engine/kagecd.js index 012abd0..b417576 100755 --- a/engine/kagecd.js +++ b/engine/kagecd.js @@ -92,6 +92,10 @@ function cdDrawCurveU(kage, polygons, x1, y1, sx1, sy1, sx2, sy2, x2, y2, a1, a2 if(kage.kUseCurve){ // generating fatten curve -- begin var kage2 = new Kage(); + kage2.kMinWidthY = kage.kMinWidthY; + kage2.kMinWidthT = kage.kMinWidthT; + kage2.kWidth = kage.kWidth; + kage2.kKakato = kage.kKakato; kage2.kRate = 10; var curve = new Array(2); // L and R