Ignore:
Timestamp:
2013/05/02 18:11:36 (13 years ago)
Author:
h_yoshimoto
Message:

#2236 2.12.3リリース以降の2.12-devへのコミット差し戻し

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/graph/SC_Graph_Base.php

    r22567 r22796  
    131131 * @version $Id$ 
    132132 */ 
    133 class SC_Graph_Base  
    134 { 
     133class SC_Graph_Base { 
    135134 
    136135    // {{{ properties 
     
    183182 
    184183    // コンストラクタ 
    185     function __construct($bgw, $bgh, $left, $top) 
    186     { 
     184    function __construct($bgw, $bgh, $left, $top) { 
    187185        $this->init(); 
    188186        // 画像作成 
     
    213211 
    214212    // リサンプル(画像を滑らかに縮小する) 
    215     function resampled() 
    216     { 
     213    function resampled() { 
    217214        $new_width = $this->bgw * 0.8; 
    218215        $new_height = $this->bgh * 0.8; 
     
    224221 
    225222    // オブジェクトカラーの設定 
    226     function setColorList($arrRGB) 
    227     { 
     223    function setColorList($arrRGB) { 
    228224        $this->arrRGB = $arrRGB; 
    229225        $count = count($this->arrRGB); 
     
    239235 
    240236    // 影のありなし 
    241     function setShadeOn($shade_on) 
    242     { 
     237    function setShadeOn($shade_on) { 
    243238        $this->shade_on = $shade_on; 
    244239    } 
    245240 
    246241    // 画像を出力する 
    247     function outputGraph($header = true, $filename = '') 
    248     { 
     242    function outputGraph($header = true, $filename = '') { 
    249243        if ($header) { 
    250244            header('Content-type: image/png'); 
     
    261255 
    262256    // 描画時のテキスト幅を求める 
    263     function getTextWidth($text, $font_size) 
    264     { 
     257    function getTextWidth($text, $font_size) { 
    265258        $text_len = strlen($text); 
    266259        $ret = $font_size * $text_len * TEXT_RATE; 
     
    275268 
    276269    // テキストを出力する 
    277     function setText($font_size, $left, $top, $text, $color = NULL, $angle = 0, $labelbg = false) 
    278     { 
     270    function setText($font_size, $left, $top, $text, $color = NULL, $angle = 0, $labelbg = false) { 
    279271        // 時計回りに角度を変更 
    280272        $angle = -$angle; 
     
    308300 
    309301    // タイトルを出力する 
    310     function drawTitle($text, $font_size = TITLE_FONT_SIZE) 
    311     { 
     302    function drawTitle($text, $font_size = TITLE_FONT_SIZE) { 
    312303        // 出力位置の算出 
    313304        $text_width = $this->getTextWidth($text, $font_size); 
     
    318309 
    319310    // ログを出力する 
    320     function debugPrint($text) 
    321     { 
     311    function debugPrint($text) { 
    322312        $text = mb_convert_encoding($text, 'UTF-8', CHAR_CODE); 
    323313        if (!isset($this->text_top)) { 
     
    330320 
    331321    // カラーラベルを描画 
    332     function drawLegend($legend_max = '', $clabelbg = true) 
    333     { 
     322    function drawLegend($legend_max = '', $clabelbg = true) { 
    334323        // 凡例が登録されていなければ中止 
    335324        if (count($this->arrLegend) <= 0) { 
     
    380369 
    381370    // カラーラベル背景の描画 
    382     function drawClabelBG($left, $top, $right, $bottom) 
    383     { 
     371    function drawClabelBG($left, $top, $right, $bottom) { 
    384372        // 影の描画 
    385373        if ($this->shade_on) { 
     
    392380 
    393381    // 凡例をセットする 
    394     function setLegend($arrLegend) 
    395     { 
     382    function setLegend($arrLegend) { 
    396383        $this->arrLegend = array_values((array)$arrLegend); 
    397384    } 
     
    408395     * @return void 
    409396     */ 
    410     function init() 
    411     { 
     397    function init() { 
    412398        // 凡例背景 
    413399        $this->ARR_LEGENDBG_COLOR = array(245,245,245); 
     
    451437     * @return array 円の中心点と直径から弧の終端座標の配列 
    452438     */ 
    453     function lfGetArcPos($cx, $cy, $cw, $ch, $e) 
    454     { 
     439    function lfGetArcPos($cx, $cy, $cw, $ch, $e) { 
    455440        // 三角関数用の角度を求める 
    456441        $s = 90 - $e; 
     
    463448 
    464449    /** 画像にテキストを描画する */ 
    465     function lfImageText($dst_image, $text, $font_size, $left, $top, $font, $arrRGB) 
    466     { 
     450    function lfImageText($dst_image, $text, $font_size, $left, $top, $font, $arrRGB) { 
    467451        $color = ImageColorAllocate($dst_image, $arrRGB[0], $arrRGB[1], $arrRGB[2]); 
    468452        $text = mb_convert_encoding($text, 'UTF-8', CHAR_CODE); 
     
    474458 
    475459    /** 表示色の取得 */ 
    476     function lfGetImageColor($image, $array) 
    477     { 
     460    function lfGetImageColor($image, $array) { 
    478461        if (count($array) != 3) { 
    479462            return NULL; 
     
    484467 
    485468    /** 影用表示色の取得 */ 
    486     function lfGetImageDarkColor($image, $array) 
    487     { 
     469    function lfGetImageDarkColor($image, $array) { 
    488470        if (count($array) != 3) { 
    489471            return NULL; 
Note: See TracChangeset for help on using the changeset viewer.